diff --git a/eng/CodeGeneration.targets b/eng/CodeGeneration.targets index 989f4215ad70..b5877411cd8e 100644 --- a/eng/CodeGeneration.targets +++ b/eng/CodeGeneration.targets @@ -3,7 +3,7 @@ <_AutoRestVersion>https://github.com/Azure/autorest/releases/download/autorest-3.0.6207/autorest-3.0.6207.tgz <_AutoRestCoreVersion>3.0.6257 - <_AutoRestCSharpVersion>https://github.com/Azure/autorest.csharp/releases/download/3.0.0-dev.20200402.2/autorest-csharp-v3-3.0.0-dev.20200402.2.tgz + <_AutoRestCSharpVersion>https://github.com/Azure/autorest.csharp/releases/download/3.0.0-dev.20200402.6/autorest-csharp-v3-3.0.0-dev.20200402.6.tgz <_SupportsCodeGeneration Condition="'$(IsClientLibrary)' == 'true'">true <_DefaultInputName Condition="Exists('$(MSBuildProjectDirectory)/autorest.md')">$(MSBuildProjectDirectory)/autorest.md $(_DefaultInputName) diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/CustomFormClient.cs b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/CustomFormClient.cs index 822d05eb0c53..fcb68821911b 100644 --- a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/CustomFormClient.cs +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/CustomFormClient.cs @@ -77,7 +77,7 @@ public virtual Operation StartTraining(string source, TrainingFileF trainRequest.SourceFilter = filter; } - ResponseWithHeaders response = _operations.RestClient.TrainCustomModelAsync(trainRequest); + ResponseWithHeaders response = _operations.RestClient.TrainCustomModelAsync(trainRequest); return new TrainingOperation(_operations, response.Headers.Location); } @@ -100,7 +100,7 @@ public virtual async Task> StartTrainingAsync(string sour trainRequest.SourceFilter = filter; } - ResponseWithHeaders response = await _operations.RestClient.TrainCustomModelAsyncAsync(trainRequest).ConfigureAwait(false); + ResponseWithHeaders response = await _operations.RestClient.TrainCustomModelAsyncAsync(trainRequest).ConfigureAwait(false); return new TrainingOperation(_operations, response.Headers.Location); } @@ -122,7 +122,7 @@ public virtual Operation StartTrainingWithLabels(string sour trainRequest.SourceFilter = filter; } - ResponseWithHeaders response = _operations.RestClient.TrainCustomModelAsync(trainRequest); + ResponseWithHeaders response = _operations.RestClient.TrainCustomModelAsync(trainRequest); return new TrainingWithLabelsOperation(_operations, response.Headers.Location); } @@ -144,7 +144,7 @@ public virtual async Task> StartTrainingWithLabels trainRequest.SourceFilter = filter; } - ResponseWithHeaders response = await _operations.RestClient.TrainCustomModelAsyncAsync(trainRequest).ConfigureAwait(false); + ResponseWithHeaders response = await _operations.RestClient.TrainCustomModelAsyncAsync(trainRequest).ConfigureAwait(false); return new TrainingWithLabelsOperation(_operations, response.Headers.Location); } @@ -168,7 +168,7 @@ public virtual Operation> StartExtractFormPages(str { // TODO: automate content-type detection // https://github.com/Azure/azure-sdk-for-net/issues/10329 - ResponseWithHeaders response = _operations.RestClient.AnalyzeWithCustomModel(new Guid(modelId), includeTextDetails: includeRawPageExtractions, contentType, stream, cancellationToken); + ResponseWithHeaders response = _operations.RestClient.AnalyzeWithCustomModel(new Guid(modelId), contentType, stream, includeTextDetails: includeRawPageExtractions, cancellationToken); return new ExtractPagesOperation(_operations, modelId, response.Headers.OperationLocation); } @@ -184,7 +184,7 @@ public virtual Operation> StartExtractFormPages(str public virtual Operation> StartExtractFormPages(string modelId, Uri uri, bool includeRawPageExtractions = false, CancellationToken cancellationToken = default) { SourcePath_internal sourcePath = new SourcePath_internal() { Source = uri.ToString() }; - ResponseWithHeaders response = _operations.RestClient.AnalyzeWithCustomModel(new Guid(modelId), includeTextDetails: includeRawPageExtractions, sourcePath, cancellationToken); + ResponseWithHeaders response = _operations.RestClient.AnalyzeWithCustomModel(new Guid(modelId), includeTextDetails: includeRawPageExtractions, sourcePath, cancellationToken); return new ExtractPagesOperation(_operations, modelId, response.Headers.OperationLocation); } @@ -202,7 +202,7 @@ public virtual async Task>> StartExtractF { // TODO: automate content-type detection // https://github.com/Azure/azure-sdk-for-net/issues/10329 - ResponseWithHeaders response = await _operations.RestClient.AnalyzeWithCustomModelAsync(new Guid(modelId), includeTextDetails: includeRawPageExtractions, contentType, stream, cancellationToken).ConfigureAwait(false); + ResponseWithHeaders response = await _operations.RestClient.AnalyzeWithCustomModelAsync(new Guid(modelId), contentType, stream, includeTextDetails: includeRawPageExtractions, cancellationToken).ConfigureAwait(false); return new ExtractPagesOperation(_operations, modelId, response.Headers.OperationLocation); } @@ -219,7 +219,7 @@ public virtual async Task>> StartExtractF public virtual async Task>> StartExtractFormPagesAsync(string modelId, Uri uri, bool includeRawPageExtractions = false, CancellationToken cancellationToken = default) { SourcePath_internal sourcePath = new SourcePath_internal() { Source = uri.ToString() }; - ResponseWithHeaders response = await _operations.RestClient.AnalyzeWithCustomModelAsync(new Guid(modelId), includeTextDetails: includeRawPageExtractions, sourcePath, cancellationToken).ConfigureAwait(false); + ResponseWithHeaders response = await _operations.RestClient.AnalyzeWithCustomModelAsync(new Guid(modelId), includeTextDetails: includeRawPageExtractions, sourcePath, cancellationToken).ConfigureAwait(false); return new ExtractPagesOperation(_operations, modelId, response.Headers.OperationLocation); } #endregion @@ -240,7 +240,7 @@ public virtual Operation> StartExtractLabele { // TODO: automate content-type detection // https://github.com/Azure/azure-sdk-for-net/issues/10329 - ResponseWithHeaders response = _operations.RestClient.AnalyzeWithCustomModel(new Guid(modelId), includeTextDetails: includeRawPageExtractions, contentType, stream, cancellationToken); + ResponseWithHeaders response = _operations.RestClient.AnalyzeWithCustomModel(new Guid(modelId), contentType, stream, includeTextDetails: includeRawPageExtractions, cancellationToken); return new ExtractLabeledFormOperation(_operations, modelId, response.Headers.OperationLocation); } @@ -256,7 +256,7 @@ public virtual Operation> StartExtractLabele public virtual Operation> StartExtractLabeledForms(string modelId, Uri uri, bool includeRawPageExtractions = false, CancellationToken cancellationToken = default) { SourcePath_internal sourcePath = new SourcePath_internal() { Source = uri.ToString() }; - ResponseWithHeaders response = _operations.RestClient.AnalyzeWithCustomModel(new Guid(modelId), includeTextDetails: includeRawPageExtractions, sourcePath, cancellationToken); + ResponseWithHeaders response = _operations.RestClient.AnalyzeWithCustomModel(new Guid(modelId), includeTextDetails: includeRawPageExtractions, sourcePath, cancellationToken); return new ExtractLabeledFormOperation(_operations, modelId, response.Headers.OperationLocation); } @@ -274,7 +274,7 @@ public virtual async Task>> StartE { // TODO: automate content-type detection // https://github.com/Azure/azure-sdk-for-net/issues/10329 - ResponseWithHeaders response = await _operations.RestClient.AnalyzeWithCustomModelAsync(new Guid(modelId), includeTextDetails: includeRawPageExtractions, contentType, stream, cancellationToken).ConfigureAwait(false); + ResponseWithHeaders response = await _operations.RestClient.AnalyzeWithCustomModelAsync(new Guid(modelId), contentType, stream, includeTextDetails: includeRawPageExtractions, cancellationToken).ConfigureAwait(false); return new ExtractLabeledFormOperation(_operations, modelId, response.Headers.OperationLocation); } @@ -290,7 +290,7 @@ public virtual async Task>> StartE public virtual async Task>> StartExtractLabeledFormsAsync(string modelId, Uri uri, bool includeRawPageExtractions = false, CancellationToken cancellationToken = default) { SourcePath_internal sourcePath = new SourcePath_internal() { Source = uri.ToString() }; - ResponseWithHeaders response = await _operations.RestClient.AnalyzeWithCustomModelAsync(new Guid(modelId), includeTextDetails: includeRawPageExtractions, sourcePath, cancellationToken).ConfigureAwait(false); + ResponseWithHeaders response = await _operations.RestClient.AnalyzeWithCustomModelAsync(new Guid(modelId), includeTextDetails: includeRawPageExtractions, sourcePath, cancellationToken).ConfigureAwait(false); return new ExtractLabeledFormOperation(_operations, modelId, response.Headers.OperationLocation); } #endregion diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/FormLayoutClient.cs b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/FormLayoutClient.cs index 636ff78d6cc5..4632beb9ff26 100644 --- a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/FormLayoutClient.cs +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/FormLayoutClient.cs @@ -64,7 +64,7 @@ public virtual Operation> StartExtractLayouts { // TODO: automate content-type detection // https://github.com/Azure/azure-sdk-for-net/issues/10329 - ResponseWithHeaders response = _operations.RestClient.AnalyzeLayoutAsync(contentType, stream, cancellationToken); + ResponseWithHeaders response = _operations.RestClient.AnalyzeLayoutAsync(contentType, stream, cancellationToken); return new ExtractLayoutOperation(_operations, response.Headers.OperationLocation); } @@ -81,7 +81,7 @@ public virtual async Task>> StartEx { // TODO: automate content-type detection // https://github.com/Azure/azure-sdk-for-net/issues/10329 - ResponseWithHeaders response = await _operations.RestClient.AnalyzeLayoutAsyncAsync(contentType, stream, cancellationToken).ConfigureAwait(false); + ResponseWithHeaders response = await _operations.RestClient.AnalyzeLayoutAsyncAsync(contentType, stream, cancellationToken).ConfigureAwait(false); return new ExtractLayoutOperation(_operations, response.Headers.OperationLocation); } @@ -96,7 +96,7 @@ public virtual async Task>> StartEx public virtual Operation> StartExtractLayouts(Uri uri, CancellationToken cancellationToken = default) { SourcePath_internal sourcePath = new SourcePath_internal() { Source = uri.ToString() }; - ResponseWithHeaders response = _operations.RestClient.AnalyzeLayoutAsync(sourcePath, cancellationToken); + ResponseWithHeaders response = _operations.RestClient.AnalyzeLayoutAsync(sourcePath, cancellationToken); return new ExtractLayoutOperation(_operations, response.Headers.OperationLocation); } @@ -111,7 +111,7 @@ public virtual Operation> StartExtractLayouts public virtual async Task>> StartExtractLayoutsAsync(Uri uri, CancellationToken cancellationToken = default) { SourcePath_internal sourcePath = new SourcePath_internal() { Source = uri.ToString() }; - ResponseWithHeaders response = await _operations.RestClient.AnalyzeLayoutAsyncAsync(sourcePath, cancellationToken).ConfigureAwait(false); + ResponseWithHeaders response = await _operations.RestClient.AnalyzeLayoutAsyncAsync(sourcePath, cancellationToken).ConfigureAwait(false); return new ExtractLayoutOperation(_operations, response.Headers.OperationLocation); } } diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/AnalyzeLayoutAsyncHeaders.cs b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/ServiceAnalyzeLayoutAsyncHeaders.cs similarity index 79% rename from sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/AnalyzeLayoutAsyncHeaders.cs rename to sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/ServiceAnalyzeLayoutAsyncHeaders.cs index 404b8e3109de..8c3c43471ac1 100644 --- a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/AnalyzeLayoutAsyncHeaders.cs +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/ServiceAnalyzeLayoutAsyncHeaders.cs @@ -10,10 +10,10 @@ namespace Azure.AI.FormRecognizer { - internal class AnalyzeLayoutAsyncHeaders + internal class ServiceAnalyzeLayoutAsyncHeaders { private readonly Response _response; - public AnalyzeLayoutAsyncHeaders(Response response) + public ServiceAnalyzeLayoutAsyncHeaders(Response response) { _response = response; } diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/AnalyzeReceiptAsyncHeaders.cs b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/ServiceAnalyzeReceiptAsyncHeaders.cs similarity index 78% rename from sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/AnalyzeReceiptAsyncHeaders.cs rename to sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/ServiceAnalyzeReceiptAsyncHeaders.cs index 1d6d43544842..a4c2b80fb638 100644 --- a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/AnalyzeReceiptAsyncHeaders.cs +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/ServiceAnalyzeReceiptAsyncHeaders.cs @@ -10,10 +10,10 @@ namespace Azure.AI.FormRecognizer { - internal class AnalyzeReceiptAsyncHeaders + internal class ServiceAnalyzeReceiptAsyncHeaders { private readonly Response _response; - public AnalyzeReceiptAsyncHeaders(Response response) + public ServiceAnalyzeReceiptAsyncHeaders(Response response) { _response = response; } diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/AnalyzeWithCustomModelHeaders.cs b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/ServiceAnalyzeWithCustomModelHeaders.cs similarity index 77% rename from sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/AnalyzeWithCustomModelHeaders.cs rename to sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/ServiceAnalyzeWithCustomModelHeaders.cs index 4cfa8b6d1045..4535dc70062a 100644 --- a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/AnalyzeWithCustomModelHeaders.cs +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/ServiceAnalyzeWithCustomModelHeaders.cs @@ -10,10 +10,10 @@ namespace Azure.AI.FormRecognizer { - internal class AnalyzeWithCustomModelHeaders + internal class ServiceAnalyzeWithCustomModelHeaders { private readonly Response _response; - public AnalyzeWithCustomModelHeaders(Response response) + public ServiceAnalyzeWithCustomModelHeaders(Response response) { _response = response; } diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/ServiceClient.cs b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/ServiceClient.cs index 5c9334712ab2..1ff9ac39db25 100644 --- a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/ServiceClient.cs +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/ServiceClient.cs @@ -54,7 +54,7 @@ public virtual Response TrainCustomModelAsync(TrainRequest_internal trainRequest /// Model identifier. /// Include list of extracted keys in model information. /// The cancellation token to use. - public virtual async Task> GetCustomModelAsync(Guid modelId, bool? includeKeys, CancellationToken cancellationToken = default) + public virtual async Task> GetCustomModelAsync(Guid modelId, bool? includeKeys = null, CancellationToken cancellationToken = default) { return await RestClient.GetCustomModelAsync(modelId, includeKeys, cancellationToken).ConfigureAwait(false); } @@ -63,7 +63,7 @@ public virtual async Task> GetCustomModelAsync(Guid mod /// Model identifier. /// Include list of extracted keys in model information. /// The cancellation token to use. - public virtual Response GetCustomModel(Guid modelId, bool? includeKeys, CancellationToken cancellationToken = default) + public virtual Response GetCustomModel(Guid modelId, bool? includeKeys = null, CancellationToken cancellationToken = default) { return RestClient.GetCustomModel(modelId, includeKeys, cancellationToken); } @@ -86,24 +86,24 @@ public virtual Response DeleteCustomModel(Guid modelId, CancellationToken cancel /// Extract key-value pairs, tables, and semantic values 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. /// Model identifier. - /// Include text lines and element references in the result. /// Upload file type. /// .json, .pdf, .jpg, .png or .tiff type file stream. + /// Include text lines and element references in the result. /// The cancellation token to use. - public virtual async Task AnalyzeWithCustomModelAsync(Guid modelId, bool? includeTextDetails, ContentType contentType, Stream fileStream, CancellationToken cancellationToken = default) + public virtual async Task AnalyzeWithCustomModelAsync(Guid modelId, ContentType contentType, Stream fileStream, bool? includeTextDetails = null, CancellationToken cancellationToken = default) { - return (await RestClient.AnalyzeWithCustomModelAsync(modelId, includeTextDetails, contentType, fileStream, cancellationToken).ConfigureAwait(false)).GetRawResponse(); + return (await RestClient.AnalyzeWithCustomModelAsync(modelId, contentType, fileStream, includeTextDetails, cancellationToken).ConfigureAwait(false)).GetRawResponse(); } /// Extract key-value pairs, tables, and semantic values 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. /// Model identifier. - /// Include text lines and element references in the result. /// Upload file type. /// .json, .pdf, .jpg, .png or .tiff type file stream. + /// Include text lines and element references in the result. /// The cancellation token to use. - public virtual Response AnalyzeWithCustomModel(Guid modelId, bool? includeTextDetails, ContentType contentType, Stream fileStream, CancellationToken cancellationToken = default) + public virtual Response AnalyzeWithCustomModel(Guid modelId, ContentType contentType, Stream fileStream, bool? includeTextDetails = null, CancellationToken cancellationToken = default) { - return RestClient.AnalyzeWithCustomModel(modelId, includeTextDetails, contentType, fileStream, cancellationToken).GetRawResponse(); + return RestClient.AnalyzeWithCustomModel(modelId, contentType, fileStream, includeTextDetails, cancellationToken).GetRawResponse(); } /// Extract key-value pairs, tables, and semantic values 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. @@ -111,7 +111,7 @@ public virtual Response AnalyzeWithCustomModel(Guid modelId, bool? includeTextDe /// Include text lines and element references in the result. /// .json, .pdf, .jpg, .png or .tiff type file stream. /// The cancellation token to use. - public virtual async Task AnalyzeWithCustomModelAsync(Guid modelId, bool? includeTextDetails, SourcePath_internal fileStream, CancellationToken cancellationToken = default) + public virtual async Task AnalyzeWithCustomModelAsync(Guid modelId, bool? includeTextDetails = null, SourcePath_internal fileStream = null, CancellationToken cancellationToken = default) { return (await RestClient.AnalyzeWithCustomModelAsync(modelId, includeTextDetails, fileStream, cancellationToken).ConfigureAwait(false)).GetRawResponse(); } @@ -121,7 +121,7 @@ public virtual async Task AnalyzeWithCustomModelAsync(Guid modelId, bo /// Include text lines and element references in the result. /// .json, .pdf, .jpg, .png or .tiff type file stream. /// The cancellation token to use. - public virtual Response AnalyzeWithCustomModel(Guid modelId, bool? includeTextDetails, SourcePath_internal fileStream, CancellationToken cancellationToken = default) + public virtual Response AnalyzeWithCustomModel(Guid modelId, bool? includeTextDetails = null, SourcePath_internal fileStream = null, CancellationToken cancellationToken = default) { return RestClient.AnalyzeWithCustomModel(modelId, includeTextDetails, fileStream, cancellationToken).GetRawResponse(); } @@ -145,30 +145,30 @@ public virtual Response GetAnalyzeFormResult(Gu } /// Extract field text and semantic values from a given receipt 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. - /// Include text lines and element references in the result. /// Upload file type. /// .json, .pdf, .jpg, .png or .tiff type file stream. + /// Include text lines and element references in the result. /// The cancellation token to use. - public virtual async Task AnalyzeReceiptAsyncAsync(bool? includeTextDetails, ContentType contentType, Stream fileStream, CancellationToken cancellationToken = default) + public virtual async Task AnalyzeReceiptAsyncAsync(ContentType contentType, Stream fileStream, bool? includeTextDetails = null, CancellationToken cancellationToken = default) { - return (await RestClient.AnalyzeReceiptAsyncAsync(includeTextDetails, contentType, fileStream, cancellationToken).ConfigureAwait(false)).GetRawResponse(); + return (await RestClient.AnalyzeReceiptAsyncAsync(contentType, fileStream, includeTextDetails, cancellationToken).ConfigureAwait(false)).GetRawResponse(); } /// Extract field text and semantic values from a given receipt 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. - /// Include text lines and element references in the result. /// Upload file type. /// .json, .pdf, .jpg, .png or .tiff type file stream. + /// Include text lines and element references in the result. /// The cancellation token to use. - public virtual Response AnalyzeReceiptAsync(bool? includeTextDetails, ContentType contentType, Stream fileStream, CancellationToken cancellationToken = default) + public virtual Response AnalyzeReceiptAsync(ContentType contentType, Stream fileStream, bool? includeTextDetails = null, CancellationToken cancellationToken = default) { - return RestClient.AnalyzeReceiptAsync(includeTextDetails, contentType, fileStream, cancellationToken).GetRawResponse(); + return RestClient.AnalyzeReceiptAsync(contentType, fileStream, includeTextDetails, cancellationToken).GetRawResponse(); } /// Extract field text and semantic values from a given receipt 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. /// Include text lines and element references in the result. /// .json, .pdf, .jpg, .png or .tiff type file stream. /// The cancellation token to use. - public virtual async Task AnalyzeReceiptAsyncAsync(bool? includeTextDetails, SourcePath_internal fileStream, CancellationToken cancellationToken = default) + public virtual async Task AnalyzeReceiptAsyncAsync(bool? includeTextDetails = null, SourcePath_internal fileStream = null, CancellationToken cancellationToken = default) { return (await RestClient.AnalyzeReceiptAsyncAsync(includeTextDetails, fileStream, cancellationToken).ConfigureAwait(false)).GetRawResponse(); } @@ -177,7 +177,7 @@ public virtual async Task AnalyzeReceiptAsyncAsync(bool? includeTextDe /// Include text lines and element references in the result. /// .json, .pdf, .jpg, .png or .tiff type file stream. /// The cancellation token to use. - public virtual Response AnalyzeReceiptAsync(bool? includeTextDetails, SourcePath_internal fileStream, CancellationToken cancellationToken = default) + public virtual Response AnalyzeReceiptAsync(bool? includeTextDetails = null, SourcePath_internal fileStream = null, CancellationToken cancellationToken = default) { return RestClient.AnalyzeReceiptAsync(includeTextDetails, fileStream, cancellationToken).GetRawResponse(); } @@ -219,7 +219,7 @@ public virtual Response AnalyzeLayoutAsync(ContentType contentType, Stream fileS /// 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 virtual async Task AnalyzeLayoutAsyncAsync(SourcePath_internal fileStream, CancellationToken cancellationToken = default) + public virtual async Task AnalyzeLayoutAsyncAsync(SourcePath_internal fileStream = null, CancellationToken cancellationToken = default) { return (await RestClient.AnalyzeLayoutAsyncAsync(fileStream, cancellationToken).ConfigureAwait(false)).GetRawResponse(); } @@ -227,7 +227,7 @@ public virtual async Task AnalyzeLayoutAsyncAsync(SourcePath_internal /// 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 virtual Response AnalyzeLayoutAsync(SourcePath_internal fileStream, CancellationToken cancellationToken = default) + public virtual Response AnalyzeLayoutAsync(SourcePath_internal fileStream = null, CancellationToken cancellationToken = default) { return RestClient.AnalyzeLayoutAsync(fileStream, cancellationToken).GetRawResponse(); } @@ -251,7 +251,7 @@ public virtual Response GetAnalyzeLayoutResult( /// Get information about all custom models. /// Specify whether to return summary or full list of models. /// The cancellation token to use. - public virtual AsyncPageable GetCustomModelsAsync(GetModelOptions? op, CancellationToken cancellationToken = default) + public virtual AsyncPageable GetCustomModelsAsync(GetModelOptions? op = null, CancellationToken cancellationToken = default) { async Task> FirstPageFunc(int? pageSizeHint) { @@ -269,7 +269,7 @@ async Task> NextPageFunc(string nextLink, int? pageSize /// Get information about all custom models. /// Specify whether to return summary or full list of models. /// The cancellation token to use. - public virtual Pageable GetCustomModels(GetModelOptions? op, CancellationToken cancellationToken = default) + public virtual Pageable GetCustomModels(GetModelOptions? op = null, CancellationToken cancellationToken = default) { Page FirstPageFunc(int? pageSizeHint) { diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/ServiceRestClient.cs b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/ServiceRestClient.cs index ae192935d0ad..7f44ad416e3c 100644 --- a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/ServiceRestClient.cs +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/ServiceRestClient.cs @@ -57,7 +57,7 @@ internal HttpMessage CreateTrainCustomModelAsyncRequest(TrainRequest_internal tr /// Create and train a custom model. The request must include a source parameter that is either an externally accessible Azure storage blob container Uri (preferably a Shared Access Signature Uri) or valid path to a data folder in a locally mounted drive. When local paths are specified, they must follow the Linux/Unix path format and be an absolute path rooted to the input mount configuration setting value e.g., if '{Mounts:Input}' configuration setting value is '/input' then a valid source path would be '/input/contosodataset'. All data to be trained is expected to be under the source folder or sub folders under it. Models are trained using documents that are of the following content type - 'application/pdf', 'image/jpeg', 'image/png', 'image/tiff'. Other type of content is ignored. /// Training request parameters. /// The cancellation token to use. - public async ValueTask> TrainCustomModelAsyncAsync(TrainRequest_internal trainRequest, CancellationToken cancellationToken = default) + public async ValueTask> TrainCustomModelAsyncAsync(TrainRequest_internal trainRequest, CancellationToken cancellationToken = default) { if (trainRequest == null) { @@ -70,7 +70,7 @@ public async ValueTask> TrainC { using var message = CreateTrainCustomModelAsyncRequest(trainRequest); await pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - var headers = new TrainCustomModelAsyncHeaders(message.Response); + var headers = new ServiceTrainCustomModelAsyncHeaders(message.Response); switch (message.Response.Status) { case 201: @@ -89,7 +89,7 @@ public async ValueTask> TrainC /// Create and train a custom model. The request must include a source parameter that is either an externally accessible Azure storage blob container Uri (preferably a Shared Access Signature Uri) or valid path to a data folder in a locally mounted drive. When local paths are specified, they must follow the Linux/Unix path format and be an absolute path rooted to the input mount configuration setting value e.g., if '{Mounts:Input}' configuration setting value is '/input' then a valid source path would be '/input/contosodataset'. All data to be trained is expected to be under the source folder or sub folders under it. Models are trained using documents that are of the following content type - 'application/pdf', 'image/jpeg', 'image/png', 'image/tiff'. Other type of content is ignored. /// Training request parameters. /// The cancellation token to use. - public ResponseWithHeaders TrainCustomModelAsync(TrainRequest_internal trainRequest, CancellationToken cancellationToken = default) + public ResponseWithHeaders TrainCustomModelAsync(TrainRequest_internal trainRequest, CancellationToken cancellationToken = default) { if (trainRequest == null) { @@ -102,7 +102,7 @@ public ResponseWithHeaders TrainCustomModelAsync(T { using var message = CreateTrainCustomModelAsyncRequest(trainRequest); pipeline.Send(message, cancellationToken); - var headers = new TrainCustomModelAsyncHeaders(message.Response); + var headers = new ServiceTrainCustomModelAsyncHeaders(message.Response); switch (message.Response.Status) { case 201: @@ -138,7 +138,7 @@ internal HttpMessage CreateGetCustomModelsRequest(GetModelOptions? op) /// Get information about all custom models. /// Specify whether to return summary or full list of models. /// The cancellation token to use. - public async ValueTask> GetCustomModelsAsync(GetModelOptions? op, CancellationToken cancellationToken = default) + public async ValueTask> GetCustomModelsAsync(GetModelOptions? op = null, CancellationToken cancellationToken = default) { using var scope = clientDiagnostics.CreateScope("ServiceClient.GetCustomModels"); scope.Start(); @@ -169,7 +169,7 @@ public async ValueTask> GetCustomModelsAsync(GetModelO /// Get information about all custom models. /// Specify whether to return summary or full list of models. /// The cancellation token to use. - public Response GetCustomModels(GetModelOptions? op, CancellationToken cancellationToken = default) + public Response GetCustomModels(GetModelOptions? op = null, CancellationToken cancellationToken = default) { using var scope = clientDiagnostics.CreateScope("ServiceClient.GetCustomModels"); scope.Start(); @@ -219,7 +219,7 @@ internal HttpMessage CreateGetCustomModelRequest(Guid modelId, bool? includeKeys /// Model identifier. /// Include list of extracted keys in model information. /// The cancellation token to use. - public async ValueTask> GetCustomModelAsync(Guid modelId, bool? includeKeys, CancellationToken cancellationToken = default) + public async ValueTask> GetCustomModelAsync(Guid modelId, bool? includeKeys = null, CancellationToken cancellationToken = default) { using var scope = clientDiagnostics.CreateScope("ServiceClient.GetCustomModel"); scope.Start(); @@ -251,7 +251,7 @@ public async ValueTask> GetCustomModelAsync(Guid modelI /// Model identifier. /// Include list of extracted keys in model information. /// The cancellation token to use. - public Response GetCustomModel(Guid modelId, bool? includeKeys, CancellationToken cancellationToken = default) + public Response GetCustomModel(Guid modelId, bool? includeKeys = null, CancellationToken cancellationToken = default) { using var scope = clientDiagnostics.CreateScope("ServiceClient.GetCustomModel"); scope.Start(); @@ -345,7 +345,7 @@ public Response DeleteCustomModel(Guid modelId, CancellationToken cancellationTo } } - internal HttpMessage CreateAnalyzeWithCustomModelRequest(Guid modelId, bool? includeTextDetails, ContentType contentType, Stream fileStream) + internal HttpMessage CreateAnalyzeWithCustomModelRequest(Guid modelId, ContentType contentType, Stream fileStream, bool? includeTextDetails) { var message = pipeline.CreateMessage(); var request = message.Request; @@ -368,11 +368,11 @@ internal HttpMessage CreateAnalyzeWithCustomModelRequest(Guid modelId, bool? inc /// Extract key-value pairs, tables, and semantic values 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. /// Model identifier. - /// Include text lines and element references in the result. /// Upload file type. /// .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 ValueTask> AnalyzeWithCustomModelAsync(Guid modelId, bool? includeTextDetails, ContentType contentType, Stream fileStream, CancellationToken cancellationToken = default) + public async ValueTask> AnalyzeWithCustomModelAsync(Guid modelId, ContentType contentType, Stream fileStream, bool? includeTextDetails = null, CancellationToken cancellationToken = default) { if (fileStream == null) { @@ -383,9 +383,9 @@ public async ValueTask> Analy scope.Start(); try { - using var message = CreateAnalyzeWithCustomModelRequest(modelId, includeTextDetails, contentType, fileStream); + using var message = CreateAnalyzeWithCustomModelRequest(modelId, contentType, fileStream, includeTextDetails); await pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - var headers = new AnalyzeWithCustomModelHeaders(message.Response); + var headers = new ServiceAnalyzeWithCustomModelHeaders(message.Response); switch (message.Response.Status) { case 202: @@ -403,11 +403,11 @@ public async ValueTask> Analy /// Extract key-value pairs, tables, and semantic values 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. /// Model identifier. - /// Include text lines and element references in the result. /// Upload file type. /// .json, .pdf, .jpg, .png or .tiff type file stream. + /// Include text lines and element references in the result. /// The cancellation token to use. - public ResponseWithHeaders AnalyzeWithCustomModel(Guid modelId, bool? includeTextDetails, ContentType contentType, Stream fileStream, CancellationToken cancellationToken = default) + public ResponseWithHeaders AnalyzeWithCustomModel(Guid modelId, ContentType contentType, Stream fileStream, bool? includeTextDetails = null, CancellationToken cancellationToken = default) { if (fileStream == null) { @@ -418,9 +418,9 @@ public ResponseWithHeaders AnalyzeWithCustomModel scope.Start(); try { - using var message = CreateAnalyzeWithCustomModelRequest(modelId, includeTextDetails, contentType, fileStream); + using var message = CreateAnalyzeWithCustomModelRequest(modelId, contentType, fileStream, includeTextDetails); pipeline.Send(message, cancellationToken); - var headers = new AnalyzeWithCustomModelHeaders(message.Response); + var headers = new ServiceAnalyzeWithCustomModelHeaders(message.Response); switch (message.Response.Status) { case 202: @@ -467,7 +467,7 @@ 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 ValueTask> AnalyzeWithCustomModelAsync(Guid modelId, bool? includeTextDetails, SourcePath_internal fileStream, CancellationToken cancellationToken = default) + public async ValueTask> AnalyzeWithCustomModelAsync(Guid modelId, bool? includeTextDetails = null, SourcePath_internal fileStream = null, CancellationToken cancellationToken = default) { using var scope = clientDiagnostics.CreateScope("ServiceClient.AnalyzeWithCustomModel"); scope.Start(); @@ -475,7 +475,7 @@ public async ValueTask> Analy { using var message = CreateAnalyzeWithCustomModelRequest(modelId, includeTextDetails, fileStream); await pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - var headers = new AnalyzeWithCustomModelHeaders(message.Response); + var headers = new ServiceAnalyzeWithCustomModelHeaders(message.Response); switch (message.Response.Status) { case 202: @@ -496,7 +496,7 @@ public async ValueTask> Analy /// Include text lines and element references in the result. /// .json, .pdf, .jpg, .png or .tiff type file stream. /// The cancellation token to use. - public ResponseWithHeaders AnalyzeWithCustomModel(Guid modelId, bool? includeTextDetails, SourcePath_internal fileStream, CancellationToken cancellationToken = default) + public ResponseWithHeaders AnalyzeWithCustomModel(Guid modelId, bool? includeTextDetails = null, SourcePath_internal fileStream = null, CancellationToken cancellationToken = default) { using var scope = clientDiagnostics.CreateScope("ServiceClient.AnalyzeWithCustomModel"); scope.Start(); @@ -504,7 +504,7 @@ public ResponseWithHeaders AnalyzeWithCustomModel { using var message = CreateAnalyzeWithCustomModelRequest(modelId, includeTextDetails, fileStream); pipeline.Send(message, cancellationToken); - var headers = new AnalyzeWithCustomModelHeaders(message.Response); + var headers = new ServiceAnalyzeWithCustomModelHeaders(message.Response); switch (message.Response.Status) { case 202: @@ -600,7 +600,7 @@ public Response GetAnalyzeFormResult(Guid model } } - internal HttpMessage CreateAnalyzeReceiptAsyncRequest(bool? includeTextDetails, ContentType contentType, Stream fileStream) + internal HttpMessage CreateAnalyzeReceiptAsyncRequest(ContentType contentType, Stream fileStream, bool? includeTextDetails) { var message = pipeline.CreateMessage(); var request = message.Request; @@ -620,11 +620,11 @@ internal HttpMessage CreateAnalyzeReceiptAsyncRequest(bool? includeTextDetails, } /// Extract field text and semantic values from a given receipt 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. - /// Include text lines and element references in the result. /// Upload file type. /// .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 ValueTask> AnalyzeReceiptAsyncAsync(bool? includeTextDetails, ContentType contentType, Stream fileStream, CancellationToken cancellationToken = default) + public async ValueTask> AnalyzeReceiptAsyncAsync(ContentType contentType, Stream fileStream, bool? includeTextDetails = null, CancellationToken cancellationToken = default) { if (fileStream == null) { @@ -635,9 +635,9 @@ public async ValueTask> AnalyzeR scope.Start(); try { - using var message = CreateAnalyzeReceiptAsyncRequest(includeTextDetails, contentType, fileStream); + using var message = CreateAnalyzeReceiptAsyncRequest(contentType, fileStream, includeTextDetails); await pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - var headers = new AnalyzeReceiptAsyncHeaders(message.Response); + var headers = new ServiceAnalyzeReceiptAsyncHeaders(message.Response); switch (message.Response.Status) { case 202: @@ -654,11 +654,11 @@ public async ValueTask> AnalyzeR } /// Extract field text and semantic values from a given receipt 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. - /// Include text lines and element references in the result. /// Upload file type. /// .json, .pdf, .jpg, .png or .tiff type file stream. + /// Include text lines and element references in the result. /// The cancellation token to use. - public ResponseWithHeaders AnalyzeReceiptAsync(bool? includeTextDetails, ContentType contentType, Stream fileStream, CancellationToken cancellationToken = default) + public ResponseWithHeaders AnalyzeReceiptAsync(ContentType contentType, Stream fileStream, bool? includeTextDetails = null, CancellationToken cancellationToken = default) { if (fileStream == null) { @@ -669,9 +669,9 @@ public ResponseWithHeaders AnalyzeReceiptAsync(bool? scope.Start(); try { - using var message = CreateAnalyzeReceiptAsyncRequest(includeTextDetails, contentType, fileStream); + using var message = CreateAnalyzeReceiptAsyncRequest(contentType, fileStream, includeTextDetails); pipeline.Send(message, cancellationToken); - var headers = new AnalyzeReceiptAsyncHeaders(message.Response); + var headers = new ServiceAnalyzeReceiptAsyncHeaders(message.Response); switch (message.Response.Status) { case 202: @@ -715,7 +715,7 @@ 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 ValueTask> AnalyzeReceiptAsyncAsync(bool? includeTextDetails, SourcePath_internal fileStream, CancellationToken cancellationToken = default) + public async ValueTask> AnalyzeReceiptAsyncAsync(bool? includeTextDetails = null, SourcePath_internal fileStream = null, CancellationToken cancellationToken = default) { using var scope = clientDiagnostics.CreateScope("ServiceClient.AnalyzeReceiptAsync"); scope.Start(); @@ -723,7 +723,7 @@ public async ValueTask> AnalyzeR { using var message = CreateAnalyzeReceiptAsyncRequest(includeTextDetails, fileStream); await pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - var headers = new AnalyzeReceiptAsyncHeaders(message.Response); + var headers = new ServiceAnalyzeReceiptAsyncHeaders(message.Response); switch (message.Response.Status) { case 202: @@ -743,7 +743,7 @@ public async ValueTask> AnalyzeR /// Include text lines and element references in the result. /// .json, .pdf, .jpg, .png or .tiff type file stream. /// The cancellation token to use. - public ResponseWithHeaders AnalyzeReceiptAsync(bool? includeTextDetails, SourcePath_internal fileStream, CancellationToken cancellationToken = default) + public ResponseWithHeaders AnalyzeReceiptAsync(bool? includeTextDetails = null, SourcePath_internal fileStream = null, CancellationToken cancellationToken = default) { using var scope = clientDiagnostics.CreateScope("ServiceClient.AnalyzeReceiptAsync"); scope.Start(); @@ -751,7 +751,7 @@ public ResponseWithHeaders AnalyzeReceiptAsync(bool? { using var message = CreateAnalyzeReceiptAsyncRequest(includeTextDetails, fileStream); pipeline.Send(message, cancellationToken); - var headers = new AnalyzeReceiptAsyncHeaders(message.Response); + var headers = new ServiceAnalyzeReceiptAsyncHeaders(message.Response); switch (message.Response.Status) { case 202: @@ -862,7 +862,7 @@ internal HttpMessage CreateAnalyzeLayoutAsyncRequest(ContentType contentType, St /// Upload file type. /// .json, .pdf, .jpg, .png or .tiff type file stream. /// The cancellation token to use. - public async ValueTask> AnalyzeLayoutAsyncAsync(ContentType contentType, Stream fileStream, CancellationToken cancellationToken = default) + public async ValueTask> AnalyzeLayoutAsyncAsync(ContentType contentType, Stream fileStream, CancellationToken cancellationToken = default) { if (fileStream == null) { @@ -875,7 +875,7 @@ public async ValueTask> AnalyzeLa { using var message = CreateAnalyzeLayoutAsyncRequest(contentType, fileStream); await pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - var headers = new AnalyzeLayoutAsyncHeaders(message.Response); + var headers = new ServiceAnalyzeLayoutAsyncHeaders(message.Response); switch (message.Response.Status) { case 202: @@ -895,7 +895,7 @@ public async ValueTask> AnalyzeLa /// Upload file type. /// .json, .pdf, .jpg, .png or .tiff type file stream. /// The cancellation token to use. - public ResponseWithHeaders AnalyzeLayoutAsync(ContentType contentType, Stream fileStream, CancellationToken cancellationToken = default) + public ResponseWithHeaders AnalyzeLayoutAsync(ContentType contentType, Stream fileStream, CancellationToken cancellationToken = default) { if (fileStream == null) { @@ -908,7 +908,7 @@ public ResponseWithHeaders AnalyzeLayoutAsync(Content { using var message = CreateAnalyzeLayoutAsyncRequest(contentType, fileStream); pipeline.Send(message, cancellationToken); - var headers = new AnalyzeLayoutAsyncHeaders(message.Response); + var headers = new ServiceAnalyzeLayoutAsyncHeaders(message.Response); switch (message.Response.Status) { case 202: @@ -947,7 +947,7 @@ 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 ValueTask> AnalyzeLayoutAsyncAsync(SourcePath_internal fileStream, CancellationToken cancellationToken = default) + public async ValueTask> AnalyzeLayoutAsyncAsync(SourcePath_internal fileStream = null, CancellationToken cancellationToken = default) { using var scope = clientDiagnostics.CreateScope("ServiceClient.AnalyzeLayoutAsync"); scope.Start(); @@ -955,7 +955,7 @@ public async ValueTask> AnalyzeLa { using var message = CreateAnalyzeLayoutAsyncRequest(fileStream); await pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - var headers = new AnalyzeLayoutAsyncHeaders(message.Response); + var headers = new ServiceAnalyzeLayoutAsyncHeaders(message.Response); switch (message.Response.Status) { case 202: @@ -974,7 +974,7 @@ public async ValueTask> AnalyzeLa /// 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 ResponseWithHeaders AnalyzeLayoutAsync(SourcePath_internal fileStream, CancellationToken cancellationToken = default) + public ResponseWithHeaders AnalyzeLayoutAsync(SourcePath_internal fileStream = null, CancellationToken cancellationToken = default) { using var scope = clientDiagnostics.CreateScope("ServiceClient.AnalyzeLayoutAsync"); scope.Start(); @@ -982,7 +982,7 @@ public ResponseWithHeaders AnalyzeLayoutAsync(SourceP { using var message = CreateAnalyzeLayoutAsyncRequest(fileStream); pipeline.Send(message, cancellationToken); - var headers = new AnalyzeLayoutAsyncHeaders(message.Response); + var headers = new ServiceAnalyzeLayoutAsyncHeaders(message.Response); switch (message.Response.Status) { case 202: @@ -1089,7 +1089,7 @@ internal HttpMessage CreateGetCustomModelsNextPageRequest(string nextLink, GetMo /// The URL to the next page of results. /// Specify whether to return summary or full list of models. /// The cancellation token to use. - public async ValueTask> GetCustomModelsNextPageAsync(string nextLink, GetModelOptions? op, CancellationToken cancellationToken = default) + public async ValueTask> GetCustomModelsNextPageAsync(string nextLink, GetModelOptions? op = null, CancellationToken cancellationToken = default) { if (nextLink == null) { @@ -1126,7 +1126,7 @@ public async ValueTask> GetCustomModelsNextPageAsync(s /// The URL to the next page of results. /// Specify whether to return summary or full list of models. /// The cancellation token to use. - public Response GetCustomModelsNextPage(string nextLink, GetModelOptions? op, CancellationToken cancellationToken = default) + public Response GetCustomModelsNextPage(string nextLink, GetModelOptions? op = null, CancellationToken cancellationToken = default) { if (nextLink == null) { diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/TrainCustomModelAsyncHeaders.cs b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/ServiceTrainCustomModelAsyncHeaders.cs similarity index 77% rename from sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/TrainCustomModelAsyncHeaders.cs rename to sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/ServiceTrainCustomModelAsyncHeaders.cs index c1adf82d95a3..a03cb276090c 100644 --- a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/TrainCustomModelAsyncHeaders.cs +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Operations/ServiceTrainCustomModelAsyncHeaders.cs @@ -10,10 +10,10 @@ namespace Azure.AI.FormRecognizer { - internal class TrainCustomModelAsyncHeaders + internal class ServiceTrainCustomModelAsyncHeaders { private readonly Response _response; - public TrainCustomModelAsyncHeaders(Response response) + public ServiceTrainCustomModelAsyncHeaders(Response response) { _response = response; } diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/ReceiptClient.cs b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/ReceiptClient.cs index 0274f0840e40..9a651b79afe5 100644 --- a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/ReceiptClient.cs +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/ReceiptClient.cs @@ -64,7 +64,7 @@ public virtual Operation> StartExtractReceipts(S { // TODO: automate content-type detection // https://github.com/Azure/azure-sdk-for-net/issues/10329 - ResponseWithHeaders response = _operations.RestClient.AnalyzeReceiptAsync(includeTextDetails: includeRawPageExtractions, contentType, stream, cancellationToken); + ResponseWithHeaders response = _operations.RestClient.AnalyzeReceiptAsync(contentType, stream, includeTextDetails: includeRawPageExtractions, cancellationToken); return new ExtractReceiptOperation(_operations, response.Headers.OperationLocation); } @@ -80,7 +80,7 @@ public virtual Operation> StartExtractReceipts(S public virtual Operation> StartExtractReceipts(Uri uri, bool includeRawPageExtractions = false, CancellationToken cancellationToken = default) { SourcePath_internal sourcePath = new SourcePath_internal() { Source = uri.ToString() }; - ResponseWithHeaders response = _operations.RestClient.AnalyzeReceiptAsync(includeTextDetails: includeRawPageExtractions, sourcePath, cancellationToken); + ResponseWithHeaders response = _operations.RestClient.AnalyzeReceiptAsync(includeTextDetails: includeRawPageExtractions, sourcePath, cancellationToken); return new ExtractReceiptOperation(_operations, response.Headers.OperationLocation); } @@ -98,7 +98,7 @@ public virtual async Task>> StartExtra { // TODO: automate content-type detection // https://github.com/Azure/azure-sdk-for-net/issues/10329 - ResponseWithHeaders response = await _operations.RestClient.AnalyzeReceiptAsyncAsync(includeTextDetails: includeRawPageExtractions, contentType, stream, cancellationToken).ConfigureAwait(false); + ResponseWithHeaders response = await _operations.RestClient.AnalyzeReceiptAsyncAsync(contentType, stream, includeTextDetails: includeRawPageExtractions, cancellationToken).ConfigureAwait(false); return new ExtractReceiptOperation(_operations, response.Headers.OperationLocation); } @@ -114,7 +114,7 @@ public virtual async Task>> StartExtra public virtual async Task>> StartExtractReceiptsAsync(Uri uri, bool includeRawPageExtractions = false, CancellationToken cancellationToken = default) { SourcePath_internal sourcePath = new SourcePath_internal() { Source = uri.ToString() }; - ResponseWithHeaders response = await _operations.RestClient.AnalyzeReceiptAsyncAsync(includeTextDetails: includeRawPageExtractions, sourcePath, cancellationToken).ConfigureAwait(false); + ResponseWithHeaders response = await _operations.RestClient.AnalyzeReceiptAsyncAsync(includeTextDetails: includeRawPageExtractions, sourcePath, cancellationToken).ConfigureAwait(false); return new ExtractReceiptOperation(_operations, response.Headers.OperationLocation); } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Operations/DataSourcesClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/Operations/DataSourcesClient.cs index 6b86a90595bd..f18001419acf 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Operations/DataSourcesClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Operations/DataSourcesClient.cs @@ -33,26 +33,26 @@ internal DataSourcesClient(ClientDiagnostics clientDiagnostics, HttpPipeline pip /// Creates a new datasource or updates a datasource if it already exists. /// The name of the datasource to create or update. + /// The definition of the datasource to create or update. /// The tracking ID sent with the request to help with debugging. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// The definition of the datasource to create or update. /// The cancellation token to use. - public virtual async Task> CreateOrUpdateAsync(string dataSourceName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, DataSource dataSource, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(string dataSourceName, DataSource dataSource, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { - return await RestClient.CreateOrUpdateAsync(dataSourceName, xMsClientRequestId, ifMatch, ifNoneMatch, dataSource, cancellationToken).ConfigureAwait(false); + return await RestClient.CreateOrUpdateAsync(dataSourceName, dataSource, xMsClientRequestId, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); } /// Creates a new datasource or updates a datasource if it already exists. /// The name of the datasource to create or update. + /// The definition of the datasource to create or update. /// The tracking ID sent with the request to help with debugging. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// The definition of the datasource to create or update. /// The cancellation token to use. - public virtual Response CreateOrUpdate(string dataSourceName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, DataSource dataSource, CancellationToken cancellationToken = default) + public virtual Response CreateOrUpdate(string dataSourceName, DataSource dataSource, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { - return RestClient.CreateOrUpdate(dataSourceName, xMsClientRequestId, ifMatch, ifNoneMatch, dataSource, cancellationToken); + return RestClient.CreateOrUpdate(dataSourceName, dataSource, xMsClientRequestId, ifMatch, ifNoneMatch, cancellationToken); } /// Deletes a datasource. @@ -61,7 +61,7 @@ public virtual Response CreateOrUpdate(string dataSourceName, Guid? /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. /// The cancellation token to use. - public virtual async Task DeleteAsync(string dataSourceName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, CancellationToken cancellationToken = default) + public virtual async Task DeleteAsync(string dataSourceName, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { return await RestClient.DeleteAsync(dataSourceName, xMsClientRequestId, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); } @@ -72,7 +72,7 @@ public virtual async Task DeleteAsync(string dataSourceName, Guid? xMs /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. /// The cancellation token to use. - public virtual Response Delete(string dataSourceName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, CancellationToken cancellationToken = default) + public virtual Response Delete(string dataSourceName, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { return RestClient.Delete(dataSourceName, xMsClientRequestId, ifMatch, ifNoneMatch, cancellationToken); } @@ -81,7 +81,7 @@ public virtual Response Delete(string dataSourceName, Guid? xMsClientRequestId, /// The name of the datasource to retrieve. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual async Task> GetAsync(string dataSourceName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string dataSourceName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return await RestClient.GetAsync(dataSourceName, xMsClientRequestId, cancellationToken).ConfigureAwait(false); } @@ -90,7 +90,7 @@ public virtual async Task> GetAsync(string dataSourceName, /// The name of the datasource to retrieve. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual Response Get(string dataSourceName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual Response Get(string dataSourceName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return RestClient.Get(dataSourceName, xMsClientRequestId, cancellationToken); } @@ -99,7 +99,7 @@ public virtual Response Get(string dataSourceName, Guid? xMsClientRe /// Selects which top-level properties of the data sources to retrieve. Specified as a comma-separated list of JSON property names, or '*' for all properties. The default is all properties. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual async Task> ListAsync(string select, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual async Task> ListAsync(string select = null, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return await RestClient.ListAsync(select, xMsClientRequestId, cancellationToken).ConfigureAwait(false); } @@ -108,27 +108,27 @@ public virtual async Task> ListAsync(string sele /// Selects which top-level properties of the data sources to retrieve. Specified as a comma-separated list of JSON property names, or '*' for all properties. The default is all properties. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual Response List(string select, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual Response List(string select = null, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return RestClient.List(select, xMsClientRequestId, cancellationToken); } /// Creates a new datasource. - /// The tracking ID sent with the request to help with debugging. /// The definition of the datasource to create. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual async Task> CreateAsync(Guid? xMsClientRequestId, DataSource dataSource, CancellationToken cancellationToken = default) + public virtual async Task> CreateAsync(DataSource dataSource, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { - return await RestClient.CreateAsync(xMsClientRequestId, dataSource, cancellationToken).ConfigureAwait(false); + return await RestClient.CreateAsync(dataSource, xMsClientRequestId, cancellationToken).ConfigureAwait(false); } /// Creates a new datasource. - /// The tracking ID sent with the request to help with debugging. /// The definition of the datasource to create. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual Response Create(Guid? xMsClientRequestId, DataSource dataSource, CancellationToken cancellationToken = default) + public virtual Response Create(DataSource dataSource, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { - return RestClient.Create(xMsClientRequestId, dataSource, cancellationToken); + return RestClient.Create(dataSource, xMsClientRequestId, cancellationToken); } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Operations/DataSourcesRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/Operations/DataSourcesRestClient.cs index fe5b54893a91..a08bf22bf15a 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Operations/DataSourcesRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Operations/DataSourcesRestClient.cs @@ -41,7 +41,7 @@ public DataSourcesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline p this.pipeline = pipeline; } - internal HttpMessage CreateCreateOrUpdateRequest(string dataSourceName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, DataSource dataSource) + internal HttpMessage CreateCreateOrUpdateRequest(string dataSourceName, DataSource dataSource, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch) { var message = pipeline.CreateMessage(); var request = message.Request; @@ -75,12 +75,12 @@ internal HttpMessage CreateCreateOrUpdateRequest(string dataSourceName, Guid? xM /// Creates a new datasource or updates a datasource if it already exists. /// The name of the datasource to create or update. + /// The definition of the datasource to create or update. /// The tracking ID sent with the request to help with debugging. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// The definition of the datasource to create or update. /// The cancellation token to use. - public async ValueTask> CreateOrUpdateAsync(string dataSourceName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, DataSource dataSource, CancellationToken cancellationToken = default) + public async ValueTask> CreateOrUpdateAsync(string dataSourceName, DataSource dataSource, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (dataSourceName == null) { @@ -95,7 +95,7 @@ public async ValueTask> CreateOrUpdateAsync(string dataSour scope.Start(); try { - using var message = CreateCreateOrUpdateRequest(dataSourceName, xMsClientRequestId, ifMatch, ifNoneMatch, dataSource); + using var message = CreateCreateOrUpdateRequest(dataSourceName, dataSource, xMsClientRequestId, ifMatch, ifNoneMatch); await pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -120,12 +120,12 @@ public async ValueTask> CreateOrUpdateAsync(string dataSour /// Creates a new datasource or updates a datasource if it already exists. /// The name of the datasource to create or update. + /// The definition of the datasource to create or update. /// The tracking ID sent with the request to help with debugging. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// The definition of the datasource to create or update. /// The cancellation token to use. - public Response CreateOrUpdate(string dataSourceName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, DataSource dataSource, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string dataSourceName, DataSource dataSource, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (dataSourceName == null) { @@ -140,7 +140,7 @@ public Response CreateOrUpdate(string dataSourceName, Guid? xMsClien scope.Start(); try { - using var message = CreateCreateOrUpdateRequest(dataSourceName, xMsClientRequestId, ifMatch, ifNoneMatch, dataSource); + using var message = CreateCreateOrUpdateRequest(dataSourceName, dataSource, xMsClientRequestId, ifMatch, ifNoneMatch); pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -196,7 +196,7 @@ internal HttpMessage CreateDeleteRequest(string dataSourceName, Guid? xMsClientR /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. /// The cancellation token to use. - public async ValueTask DeleteAsync(string dataSourceName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, CancellationToken cancellationToken = default) + public async ValueTask DeleteAsync(string dataSourceName, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (dataSourceName == null) { @@ -231,7 +231,7 @@ public async ValueTask DeleteAsync(string dataSourceName, Guid? xMsCli /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. /// The cancellation token to use. - public Response Delete(string dataSourceName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, CancellationToken cancellationToken = default) + public Response Delete(string dataSourceName, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (dataSourceName == null) { @@ -283,7 +283,7 @@ internal HttpMessage CreateGetRequest(string dataSourceName, Guid? xMsClientRequ /// The name of the datasource to retrieve. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public async ValueTask> GetAsync(string dataSourceName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public async ValueTask> GetAsync(string dataSourceName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (dataSourceName == null) { @@ -320,7 +320,7 @@ public async ValueTask> GetAsync(string dataSourceName, Gui /// The name of the datasource to retrieve. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public Response Get(string dataSourceName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public Response Get(string dataSourceName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (dataSourceName == null) { @@ -378,7 +378,7 @@ internal HttpMessage CreateListRequest(string select, Guid? xMsClientRequestId) /// Selects which top-level properties of the data sources to retrieve. Specified as a comma-separated list of JSON property names, or '*' for all properties. The default is all properties. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public async ValueTask> ListAsync(string select, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public async ValueTask> ListAsync(string select = null, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { using var scope = clientDiagnostics.CreateScope("DataSourcesClient.List"); scope.Start(); @@ -410,7 +410,7 @@ public async ValueTask> ListAsync(string select, /// Selects which top-level properties of the data sources to retrieve. Specified as a comma-separated list of JSON property names, or '*' for all properties. The default is all properties. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public Response List(string select, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public Response List(string select = null, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { using var scope = clientDiagnostics.CreateScope("DataSourcesClient.List"); scope.Start(); @@ -438,7 +438,7 @@ public Response List(string select, Guid? xMsClientReques } } - internal HttpMessage CreateCreateRequest(Guid? xMsClientRequestId, DataSource dataSource) + internal HttpMessage CreateCreateRequest(DataSource dataSource, Guid? xMsClientRequestId) { var message = pipeline.CreateMessage(); var request = message.Request; @@ -460,10 +460,10 @@ internal HttpMessage CreateCreateRequest(Guid? xMsClientRequestId, DataSource da } /// Creates a new datasource. - /// The tracking ID sent with the request to help with debugging. /// The definition of the datasource to create. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public async ValueTask> CreateAsync(Guid? xMsClientRequestId, DataSource dataSource, CancellationToken cancellationToken = default) + public async ValueTask> CreateAsync(DataSource dataSource, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (dataSource == null) { @@ -474,7 +474,7 @@ public async ValueTask> CreateAsync(Guid? xMsClientRequestI scope.Start(); try { - using var message = CreateCreateRequest(xMsClientRequestId, dataSource); + using var message = CreateCreateRequest(dataSource, xMsClientRequestId); await pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -497,10 +497,10 @@ public async ValueTask> CreateAsync(Guid? xMsClientRequestI } /// Creates a new datasource. - /// The tracking ID sent with the request to help with debugging. /// The definition of the datasource to create. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public Response Create(Guid? xMsClientRequestId, DataSource dataSource, CancellationToken cancellationToken = default) + public Response Create(DataSource dataSource, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (dataSource == null) { @@ -511,7 +511,7 @@ public Response Create(Guid? xMsClientRequestId, DataSource dataSour scope.Start(); try { - using var message = CreateCreateRequest(xMsClientRequestId, dataSource); + using var message = CreateCreateRequest(dataSource, xMsClientRequestId); pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Operations/DocumentsClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/Operations/DocumentsClient.cs index 6baeab17065d..baafe0d9827d 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Operations/DocumentsClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Operations/DocumentsClient.cs @@ -35,7 +35,7 @@ internal DocumentsClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipel /// Queries the number of documents in the index. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual async Task> CountAsync(Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual async Task> CountAsync(Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return await RestClient.CountAsync(xMsClientRequestId, cancellationToken).ConfigureAwait(false); } @@ -43,27 +43,27 @@ public virtual async Task> CountAsync(Guid? xMsClientRequestId, C /// Queries the number of documents in the index. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual Response Count(Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual Response Count(Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return RestClient.Count(xMsClientRequestId, cancellationToken); } /// Searches for documents in the index. - /// The tracking ID sent with the request to help with debugging. /// The definition of the Search request. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual async Task> SearchPostAsync(Guid? xMsClientRequestId, SearchOptions searchRequest, CancellationToken cancellationToken = default) + public virtual async Task> SearchPostAsync(SearchOptions searchRequest, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { - return await RestClient.SearchPostAsync(xMsClientRequestId, searchRequest, cancellationToken).ConfigureAwait(false); + return await RestClient.SearchPostAsync(searchRequest, xMsClientRequestId, cancellationToken).ConfigureAwait(false); } /// Searches for documents in the index. - /// The tracking ID sent with the request to help with debugging. /// The definition of the Search request. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual Response SearchPost(Guid? xMsClientRequestId, SearchOptions searchRequest, CancellationToken cancellationToken = default) + public virtual Response SearchPost(SearchOptions searchRequest, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { - return RestClient.SearchPost(xMsClientRequestId, searchRequest, cancellationToken); + return RestClient.SearchPost(searchRequest, xMsClientRequestId, cancellationToken); } /// Retrieves a document from the index. @@ -71,7 +71,7 @@ public virtual Response SearchPost(Guid? xMsClientRequest /// List of field names to retrieve for the document; Any field not retrieved will be missing from the returned document. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual async Task>> GetAsync(string key, IEnumerable selectedFields, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual async Task>> GetAsync(string key, IEnumerable selectedFields = null, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return await RestClient.GetAsync(key, selectedFields, xMsClientRequestId, cancellationToken).ConfigureAwait(false); } @@ -81,63 +81,63 @@ public virtual async Task>> GetAsyn /// List of field names to retrieve for the document; Any field not retrieved will be missing from the returned document. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual Response> Get(string key, IEnumerable selectedFields, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual Response> Get(string key, IEnumerable selectedFields = null, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return RestClient.Get(key, selectedFields, xMsClientRequestId, cancellationToken); } /// Suggests documents in the index that match the given partial query text. - /// The tracking ID sent with the request to help with debugging. /// The Suggest request. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual async Task> SuggestPostAsync(Guid? xMsClientRequestId, SuggestOptions suggestRequest, CancellationToken cancellationToken = default) + public virtual async Task> SuggestPostAsync(SuggestOptions suggestRequest, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { - return await RestClient.SuggestPostAsync(xMsClientRequestId, suggestRequest, cancellationToken).ConfigureAwait(false); + return await RestClient.SuggestPostAsync(suggestRequest, xMsClientRequestId, cancellationToken).ConfigureAwait(false); } /// Suggests documents in the index that match the given partial query text. - /// The tracking ID sent with the request to help with debugging. /// The Suggest request. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual Response SuggestPost(Guid? xMsClientRequestId, SuggestOptions suggestRequest, CancellationToken cancellationToken = default) + public virtual Response SuggestPost(SuggestOptions suggestRequest, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { - return RestClient.SuggestPost(xMsClientRequestId, suggestRequest, cancellationToken); + return RestClient.SuggestPost(suggestRequest, xMsClientRequestId, cancellationToken); } /// Sends a batch of document write actions to the index. - /// The tracking ID sent with the request to help with debugging. /// The batch of index actions. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual async Task> IndexAsync(Guid? xMsClientRequestId, IndexBatch batch, CancellationToken cancellationToken = default) + public virtual async Task> IndexAsync(IndexBatch batch, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { - return await RestClient.IndexAsync(xMsClientRequestId, batch, cancellationToken).ConfigureAwait(false); + return await RestClient.IndexAsync(batch, xMsClientRequestId, cancellationToken).ConfigureAwait(false); } /// Sends a batch of document write actions to the index. - /// The tracking ID sent with the request to help with debugging. /// The batch of index actions. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual Response Index(Guid? xMsClientRequestId, IndexBatch batch, CancellationToken cancellationToken = default) + public virtual Response Index(IndexBatch batch, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { - return RestClient.Index(xMsClientRequestId, batch, cancellationToken); + return RestClient.Index(batch, xMsClientRequestId, cancellationToken); } /// Autocompletes incomplete query terms based on input text and matching terms in the index. - /// The tracking ID sent with the request to help with debugging. /// The definition of the Autocomplete request. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual async Task> AutocompletePostAsync(Guid? xMsClientRequestId, AutocompleteOptions autocompleteRequest, CancellationToken cancellationToken = default) + public virtual async Task> AutocompletePostAsync(AutocompleteOptions autocompleteRequest, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { - return await RestClient.AutocompletePostAsync(xMsClientRequestId, autocompleteRequest, cancellationToken).ConfigureAwait(false); + return await RestClient.AutocompletePostAsync(autocompleteRequest, xMsClientRequestId, cancellationToken).ConfigureAwait(false); } /// Autocompletes incomplete query terms based on input text and matching terms in the index. - /// The tracking ID sent with the request to help with debugging. /// The definition of the Autocomplete request. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual Response AutocompletePost(Guid? xMsClientRequestId, AutocompleteOptions autocompleteRequest, CancellationToken cancellationToken = default) + public virtual Response AutocompletePost(AutocompleteOptions autocompleteRequest, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { - return RestClient.AutocompletePost(xMsClientRequestId, autocompleteRequest, cancellationToken); + return RestClient.AutocompletePost(autocompleteRequest, xMsClientRequestId, cancellationToken); } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Operations/DocumentsRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/Operations/DocumentsRestClient.cs index ea40a7a46869..75810ffe5768 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Operations/DocumentsRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Operations/DocumentsRestClient.cs @@ -71,7 +71,7 @@ internal HttpMessage CreateCountRequest(Guid? xMsClientRequestId) /// Queries the number of documents in the index. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public async ValueTask> CountAsync(Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public async ValueTask> CountAsync(Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { using var scope = clientDiagnostics.CreateScope("DocumentsClient.Count"); scope.Start(); @@ -102,7 +102,7 @@ public async ValueTask> CountAsync(Guid? xMsClientRequestId, Canc /// Queries the number of documents in the index. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public Response Count(Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public Response Count(Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { using var scope = clientDiagnostics.CreateScope("DocumentsClient.Count"); scope.Start(); @@ -130,7 +130,7 @@ public Response Count(Guid? xMsClientRequestId, CancellationToken cancella } } - internal HttpMessage CreateSearchPostRequest(Guid? xMsClientRequestId, SearchOptions searchRequest) + internal HttpMessage CreateSearchPostRequest(SearchOptions searchRequest, Guid? xMsClientRequestId) { var message = pipeline.CreateMessage(); var request = message.Request; @@ -155,10 +155,10 @@ internal HttpMessage CreateSearchPostRequest(Guid? xMsClientRequestId, SearchOpt } /// Searches for documents in the index. - /// The tracking ID sent with the request to help with debugging. /// The definition of the Search request. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public async ValueTask> SearchPostAsync(Guid? xMsClientRequestId, SearchOptions searchRequest, CancellationToken cancellationToken = default) + public async ValueTask> SearchPostAsync(SearchOptions searchRequest, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (searchRequest == null) { @@ -169,7 +169,7 @@ public async ValueTask> SearchPostAsync(Guid? xM scope.Start(); try { - using var message = CreateSearchPostRequest(xMsClientRequestId, searchRequest); + using var message = CreateSearchPostRequest(searchRequest, xMsClientRequestId); await pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -192,10 +192,10 @@ public async ValueTask> SearchPostAsync(Guid? xM } /// Searches for documents in the index. - /// The tracking ID sent with the request to help with debugging. /// The definition of the Search request. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public Response SearchPost(Guid? xMsClientRequestId, SearchOptions searchRequest, CancellationToken cancellationToken = default) + public Response SearchPost(SearchOptions searchRequest, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (searchRequest == null) { @@ -206,7 +206,7 @@ public Response SearchPost(Guid? xMsClientRequestId, Sear scope.Start(); try { - using var message = CreateSearchPostRequest(xMsClientRequestId, searchRequest); + using var message = CreateSearchPostRequest(searchRequest, xMsClientRequestId); pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -259,7 +259,7 @@ internal HttpMessage CreateGetRequest(string key, IEnumerable selectedFi /// List of field names to retrieve for the document; Any field not retrieved will be missing from the returned document. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public async ValueTask>> GetAsync(string key, IEnumerable selectedFields, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public async ValueTask>> GetAsync(string key, IEnumerable selectedFields = null, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (key == null) { @@ -302,7 +302,7 @@ public async ValueTask>> GetAsync(s /// List of field names to retrieve for the document; Any field not retrieved will be missing from the returned document. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public Response> Get(string key, IEnumerable selectedFields, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public Response> Get(string key, IEnumerable selectedFields = null, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (key == null) { @@ -340,7 +340,7 @@ public Response> Get(string key, IEnumerable } } - internal HttpMessage CreateSuggestPostRequest(Guid? xMsClientRequestId, SuggestOptions suggestRequest) + internal HttpMessage CreateSuggestPostRequest(SuggestOptions suggestRequest, Guid? xMsClientRequestId) { var message = pipeline.CreateMessage(); var request = message.Request; @@ -365,10 +365,10 @@ internal HttpMessage CreateSuggestPostRequest(Guid? xMsClientRequestId, SuggestO } /// Suggests documents in the index that match the given partial query text. - /// The tracking ID sent with the request to help with debugging. /// The Suggest request. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public async ValueTask> SuggestPostAsync(Guid? xMsClientRequestId, SuggestOptions suggestRequest, CancellationToken cancellationToken = default) + public async ValueTask> SuggestPostAsync(SuggestOptions suggestRequest, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (suggestRequest == null) { @@ -379,7 +379,7 @@ public async ValueTask> SuggestPostAsync(Guid? scope.Start(); try { - using var message = CreateSuggestPostRequest(xMsClientRequestId, suggestRequest); + using var message = CreateSuggestPostRequest(suggestRequest, xMsClientRequestId); await pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -402,10 +402,10 @@ public async ValueTask> SuggestPostAsync(Guid? } /// Suggests documents in the index that match the given partial query text. - /// The tracking ID sent with the request to help with debugging. /// The Suggest request. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public Response SuggestPost(Guid? xMsClientRequestId, SuggestOptions suggestRequest, CancellationToken cancellationToken = default) + public Response SuggestPost(SuggestOptions suggestRequest, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (suggestRequest == null) { @@ -416,7 +416,7 @@ public Response SuggestPost(Guid? xMsClientRequestId, Su scope.Start(); try { - using var message = CreateSuggestPostRequest(xMsClientRequestId, suggestRequest); + using var message = CreateSuggestPostRequest(suggestRequest, xMsClientRequestId); pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -438,7 +438,7 @@ public Response SuggestPost(Guid? xMsClientRequestId, Su } } - internal HttpMessage CreateIndexRequest(Guid? xMsClientRequestId, IndexBatch batch) + internal HttpMessage CreateIndexRequest(IndexBatch batch, Guid? xMsClientRequestId) { var message = pipeline.CreateMessage(); var request = message.Request; @@ -463,10 +463,10 @@ internal HttpMessage CreateIndexRequest(Guid? xMsClientRequestId, IndexBatch bat } /// Sends a batch of document write actions to the index. - /// The tracking ID sent with the request to help with debugging. /// The batch of index actions. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public async ValueTask> IndexAsync(Guid? xMsClientRequestId, IndexBatch batch, CancellationToken cancellationToken = default) + public async ValueTask> IndexAsync(IndexBatch batch, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (batch == null) { @@ -477,7 +477,7 @@ public async ValueTask> IndexAsync(Guid? xMsClien scope.Start(); try { - using var message = CreateIndexRequest(xMsClientRequestId, batch); + using var message = CreateIndexRequest(batch, xMsClientRequestId); await pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -501,10 +501,10 @@ public async ValueTask> IndexAsync(Guid? xMsClien } /// Sends a batch of document write actions to the index. - /// The tracking ID sent with the request to help with debugging. /// The batch of index actions. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public Response Index(Guid? xMsClientRequestId, IndexBatch batch, CancellationToken cancellationToken = default) + public Response Index(IndexBatch batch, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (batch == null) { @@ -515,7 +515,7 @@ public Response Index(Guid? xMsClientRequestId, IndexBatch scope.Start(); try { - using var message = CreateIndexRequest(xMsClientRequestId, batch); + using var message = CreateIndexRequest(batch, xMsClientRequestId); pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -538,7 +538,7 @@ public Response Index(Guid? xMsClientRequestId, IndexBatch } } - internal HttpMessage CreateAutocompletePostRequest(Guid? xMsClientRequestId, AutocompleteOptions autocompleteRequest) + internal HttpMessage CreateAutocompletePostRequest(AutocompleteOptions autocompleteRequest, Guid? xMsClientRequestId) { var message = pipeline.CreateMessage(); var request = message.Request; @@ -563,10 +563,10 @@ internal HttpMessage CreateAutocompletePostRequest(Guid? xMsClientRequestId, Aut } /// Autocompletes incomplete query terms based on input text and matching terms in the index. - /// The tracking ID sent with the request to help with debugging. /// The definition of the Autocomplete request. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public async ValueTask> AutocompletePostAsync(Guid? xMsClientRequestId, AutocompleteOptions autocompleteRequest, CancellationToken cancellationToken = default) + public async ValueTask> AutocompletePostAsync(AutocompleteOptions autocompleteRequest, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (autocompleteRequest == null) { @@ -577,7 +577,7 @@ public async ValueTask> AutocompletePostAsync(Guid scope.Start(); try { - using var message = CreateAutocompletePostRequest(xMsClientRequestId, autocompleteRequest); + using var message = CreateAutocompletePostRequest(autocompleteRequest, xMsClientRequestId); await pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -600,10 +600,10 @@ public async ValueTask> AutocompletePostAsync(Guid } /// Autocompletes incomplete query terms based on input text and matching terms in the index. - /// The tracking ID sent with the request to help with debugging. /// The definition of the Autocomplete request. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public Response AutocompletePost(Guid? xMsClientRequestId, AutocompleteOptions autocompleteRequest, CancellationToken cancellationToken = default) + public Response AutocompletePost(AutocompleteOptions autocompleteRequest, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (autocompleteRequest == null) { @@ -614,7 +614,7 @@ public Response AutocompletePost(Guid? xMsClientRequestId, scope.Start(); try { - using var message = CreateAutocompletePostRequest(xMsClientRequestId, autocompleteRequest); + using var message = CreateAutocompletePostRequest(autocompleteRequest, xMsClientRequestId); pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Operations/IndexersClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/Operations/IndexersClient.cs index 7a7886ac7fbf..fb429a20932b 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Operations/IndexersClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Operations/IndexersClient.cs @@ -35,7 +35,7 @@ internal IndexersClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeli /// The name of the indexer to reset. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual async Task ResetAsync(string indexerName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual async Task ResetAsync(string indexerName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return await RestClient.ResetAsync(indexerName, xMsClientRequestId, cancellationToken).ConfigureAwait(false); } @@ -44,7 +44,7 @@ public virtual async Task ResetAsync(string indexerName, Guid? xMsClie /// The name of the indexer to reset. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual Response Reset(string indexerName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual Response Reset(string indexerName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return RestClient.Reset(indexerName, xMsClientRequestId, cancellationToken); } @@ -53,7 +53,7 @@ public virtual Response Reset(string indexerName, Guid? xMsClientRequestId, Canc /// The name of the indexer to run. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual async Task RunAsync(string indexerName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual async Task RunAsync(string indexerName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return await RestClient.RunAsync(indexerName, xMsClientRequestId, cancellationToken).ConfigureAwait(false); } @@ -62,33 +62,33 @@ public virtual async Task RunAsync(string indexerName, Guid? xMsClient /// The name of the indexer to run. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual Response Run(string indexerName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual Response Run(string indexerName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return RestClient.Run(indexerName, xMsClientRequestId, cancellationToken); } /// Creates a new indexer or updates an indexer if it already exists. /// The name of the indexer to create or update. + /// The definition of the indexer to create or update. /// The tracking ID sent with the request to help with debugging. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// The definition of the indexer to create or update. /// The cancellation token to use. - public virtual async Task> CreateOrUpdateAsync(string indexerName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, SearchIndexer indexer, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(string indexerName, SearchIndexer indexer, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { - return await RestClient.CreateOrUpdateAsync(indexerName, xMsClientRequestId, ifMatch, ifNoneMatch, indexer, cancellationToken).ConfigureAwait(false); + return await RestClient.CreateOrUpdateAsync(indexerName, indexer, xMsClientRequestId, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); } /// Creates a new indexer or updates an indexer if it already exists. /// The name of the indexer to create or update. + /// The definition of the indexer to create or update. /// The tracking ID sent with the request to help with debugging. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// The definition of the indexer to create or update. /// The cancellation token to use. - public virtual Response CreateOrUpdate(string indexerName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, SearchIndexer indexer, CancellationToken cancellationToken = default) + public virtual Response CreateOrUpdate(string indexerName, SearchIndexer indexer, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { - return RestClient.CreateOrUpdate(indexerName, xMsClientRequestId, ifMatch, ifNoneMatch, indexer, cancellationToken); + return RestClient.CreateOrUpdate(indexerName, indexer, xMsClientRequestId, ifMatch, ifNoneMatch, cancellationToken); } /// Deletes an indexer. @@ -97,7 +97,7 @@ public virtual Response CreateOrUpdate(string indexerName, Guid? /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. /// The cancellation token to use. - public virtual async Task DeleteAsync(string indexerName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, CancellationToken cancellationToken = default) + public virtual async Task DeleteAsync(string indexerName, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { return await RestClient.DeleteAsync(indexerName, xMsClientRequestId, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); } @@ -108,7 +108,7 @@ public virtual async Task DeleteAsync(string indexerName, Guid? xMsCli /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. /// The cancellation token to use. - public virtual Response Delete(string indexerName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, CancellationToken cancellationToken = default) + public virtual Response Delete(string indexerName, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { return RestClient.Delete(indexerName, xMsClientRequestId, ifMatch, ifNoneMatch, cancellationToken); } @@ -117,7 +117,7 @@ public virtual Response Delete(string indexerName, Guid? xMsClientRequestId, str /// The name of the indexer to retrieve. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual async Task> GetAsync(string indexerName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string indexerName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return await RestClient.GetAsync(indexerName, xMsClientRequestId, cancellationToken).ConfigureAwait(false); } @@ -126,7 +126,7 @@ public virtual async Task> GetAsync(string indexerName, /// The name of the indexer to retrieve. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual Response Get(string indexerName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual Response Get(string indexerName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return RestClient.Get(indexerName, xMsClientRequestId, cancellationToken); } @@ -135,7 +135,7 @@ public virtual Response Get(string indexerName, Guid? xMsClientRe /// Selects which top-level properties of the indexers to retrieve. Specified as a comma-separated list of JSON property names, or '*' for all properties. The default is all properties. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual async Task> ListAsync(string select, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual async Task> ListAsync(string select = null, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return await RestClient.ListAsync(select, xMsClientRequestId, cancellationToken).ConfigureAwait(false); } @@ -144,34 +144,34 @@ public virtual async Task> ListAsync(string select, /// Selects which top-level properties of the indexers to retrieve. Specified as a comma-separated list of JSON property names, or '*' for all properties. The default is all properties. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual Response List(string select, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual Response List(string select = null, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return RestClient.List(select, xMsClientRequestId, cancellationToken); } /// Creates a new indexer. - /// The tracking ID sent with the request to help with debugging. /// The definition of the indexer to create. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual async Task> CreateAsync(Guid? xMsClientRequestId, SearchIndexer indexer, CancellationToken cancellationToken = default) + public virtual async Task> CreateAsync(SearchIndexer indexer, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { - return await RestClient.CreateAsync(xMsClientRequestId, indexer, cancellationToken).ConfigureAwait(false); + return await RestClient.CreateAsync(indexer, xMsClientRequestId, cancellationToken).ConfigureAwait(false); } /// Creates a new indexer. - /// The tracking ID sent with the request to help with debugging. /// The definition of the indexer to create. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual Response Create(Guid? xMsClientRequestId, SearchIndexer indexer, CancellationToken cancellationToken = default) + public virtual Response Create(SearchIndexer indexer, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { - return RestClient.Create(xMsClientRequestId, indexer, cancellationToken); + return RestClient.Create(indexer, xMsClientRequestId, cancellationToken); } /// Returns the current status and execution history of an indexer. /// The name of the indexer for which to retrieve status. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual async Task> GetStatusAsync(string indexerName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual async Task> GetStatusAsync(string indexerName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return await RestClient.GetStatusAsync(indexerName, xMsClientRequestId, cancellationToken).ConfigureAwait(false); } @@ -180,7 +180,7 @@ public virtual async Task> GetStatusAsync(string /// The name of the indexer for which to retrieve status. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual Response GetStatus(string indexerName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual Response GetStatus(string indexerName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return RestClient.GetStatus(indexerName, xMsClientRequestId, cancellationToken); } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Operations/IndexersRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/Operations/IndexersRestClient.cs index f25eee15fb6c..cd806d74548e 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Operations/IndexersRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Operations/IndexersRestClient.cs @@ -64,7 +64,7 @@ internal HttpMessage CreateResetRequest(string indexerName, Guid? xMsClientReque /// The name of the indexer to reset. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public async ValueTask ResetAsync(string indexerName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public async ValueTask ResetAsync(string indexerName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (indexerName == null) { @@ -96,7 +96,7 @@ public async ValueTask ResetAsync(string indexerName, Guid? xMsClientR /// The name of the indexer to reset. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public Response Reset(string indexerName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public Response Reset(string indexerName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (indexerName == null) { @@ -147,7 +147,7 @@ internal HttpMessage CreateRunRequest(string indexerName, Guid? xMsClientRequest /// The name of the indexer to run. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public async ValueTask RunAsync(string indexerName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public async ValueTask RunAsync(string indexerName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (indexerName == null) { @@ -179,7 +179,7 @@ public async ValueTask RunAsync(string indexerName, Guid? xMsClientReq /// The name of the indexer to run. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public Response Run(string indexerName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public Response Run(string indexerName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (indexerName == null) { @@ -207,7 +207,7 @@ public Response Run(string indexerName, Guid? xMsClientRequestId, CancellationTo } } - internal HttpMessage CreateCreateOrUpdateRequest(string indexerName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, SearchIndexer indexer) + internal HttpMessage CreateCreateOrUpdateRequest(string indexerName, SearchIndexer indexer, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch) { var message = pipeline.CreateMessage(); var request = message.Request; @@ -241,12 +241,12 @@ internal HttpMessage CreateCreateOrUpdateRequest(string indexerName, Guid? xMsCl /// Creates a new indexer or updates an indexer if it already exists. /// The name of the indexer to create or update. + /// The definition of the indexer to create or update. /// The tracking ID sent with the request to help with debugging. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// The definition of the indexer to create or update. /// The cancellation token to use. - public async ValueTask> CreateOrUpdateAsync(string indexerName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, SearchIndexer indexer, CancellationToken cancellationToken = default) + public async ValueTask> CreateOrUpdateAsync(string indexerName, SearchIndexer indexer, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (indexerName == null) { @@ -261,7 +261,7 @@ public async ValueTask> CreateOrUpdateAsync(string index scope.Start(); try { - using var message = CreateCreateOrUpdateRequest(indexerName, xMsClientRequestId, ifMatch, ifNoneMatch, indexer); + using var message = CreateCreateOrUpdateRequest(indexerName, indexer, xMsClientRequestId, ifMatch, ifNoneMatch); await pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -286,12 +286,12 @@ public async ValueTask> CreateOrUpdateAsync(string index /// Creates a new indexer or updates an indexer if it already exists. /// The name of the indexer to create or update. + /// The definition of the indexer to create or update. /// The tracking ID sent with the request to help with debugging. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// The definition of the indexer to create or update. /// The cancellation token to use. - public Response CreateOrUpdate(string indexerName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, SearchIndexer indexer, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string indexerName, SearchIndexer indexer, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (indexerName == null) { @@ -306,7 +306,7 @@ public Response CreateOrUpdate(string indexerName, Guid? xMsClien scope.Start(); try { - using var message = CreateCreateOrUpdateRequest(indexerName, xMsClientRequestId, ifMatch, ifNoneMatch, indexer); + using var message = CreateCreateOrUpdateRequest(indexerName, indexer, xMsClientRequestId, ifMatch, ifNoneMatch); pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -362,7 +362,7 @@ internal HttpMessage CreateDeleteRequest(string indexerName, Guid? xMsClientRequ /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. /// The cancellation token to use. - public async ValueTask DeleteAsync(string indexerName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, CancellationToken cancellationToken = default) + public async ValueTask DeleteAsync(string indexerName, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (indexerName == null) { @@ -397,7 +397,7 @@ public async ValueTask DeleteAsync(string indexerName, Guid? xMsClient /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. /// The cancellation token to use. - public Response Delete(string indexerName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, CancellationToken cancellationToken = default) + public Response Delete(string indexerName, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (indexerName == null) { @@ -449,7 +449,7 @@ internal HttpMessage CreateGetRequest(string indexerName, Guid? xMsClientRequest /// The name of the indexer to retrieve. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public async ValueTask> GetAsync(string indexerName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public async ValueTask> GetAsync(string indexerName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (indexerName == null) { @@ -486,7 +486,7 @@ public async ValueTask> GetAsync(string indexerName, Gui /// The name of the indexer to retrieve. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public Response Get(string indexerName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public Response Get(string indexerName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (indexerName == null) { @@ -544,7 +544,7 @@ internal HttpMessage CreateListRequest(string select, Guid? xMsClientRequestId) /// Selects which top-level properties of the indexers to retrieve. Specified as a comma-separated list of JSON property names, or '*' for all properties. The default is all properties. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public async ValueTask> ListAsync(string select, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public async ValueTask> ListAsync(string select = null, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { using var scope = clientDiagnostics.CreateScope("IndexersClient.List"); scope.Start(); @@ -576,7 +576,7 @@ public async ValueTask> ListAsync(string select, Gu /// Selects which top-level properties of the indexers to retrieve. Specified as a comma-separated list of JSON property names, or '*' for all properties. The default is all properties. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public Response List(string select, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public Response List(string select = null, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { using var scope = clientDiagnostics.CreateScope("IndexersClient.List"); scope.Start(); @@ -604,7 +604,7 @@ public Response List(string select, Guid? xMsClientRequestId } } - internal HttpMessage CreateCreateRequest(Guid? xMsClientRequestId, SearchIndexer indexer) + internal HttpMessage CreateCreateRequest(SearchIndexer indexer, Guid? xMsClientRequestId) { var message = pipeline.CreateMessage(); var request = message.Request; @@ -626,10 +626,10 @@ internal HttpMessage CreateCreateRequest(Guid? xMsClientRequestId, SearchIndexer } /// Creates a new indexer. - /// The tracking ID sent with the request to help with debugging. /// The definition of the indexer to create. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public async ValueTask> CreateAsync(Guid? xMsClientRequestId, SearchIndexer indexer, CancellationToken cancellationToken = default) + public async ValueTask> CreateAsync(SearchIndexer indexer, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (indexer == null) { @@ -640,7 +640,7 @@ public async ValueTask> CreateAsync(Guid? xMsClientReque scope.Start(); try { - using var message = CreateCreateRequest(xMsClientRequestId, indexer); + using var message = CreateCreateRequest(indexer, xMsClientRequestId); await pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -663,10 +663,10 @@ public async ValueTask> CreateAsync(Guid? xMsClientReque } /// Creates a new indexer. - /// The tracking ID sent with the request to help with debugging. /// The definition of the indexer to create. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public Response Create(Guid? xMsClientRequestId, SearchIndexer indexer, CancellationToken cancellationToken = default) + public Response Create(SearchIndexer indexer, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (indexer == null) { @@ -677,7 +677,7 @@ public Response Create(Guid? xMsClientRequestId, SearchIndexer in scope.Start(); try { - using var message = CreateCreateRequest(xMsClientRequestId, indexer); + using var message = CreateCreateRequest(indexer, xMsClientRequestId); pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -722,7 +722,7 @@ internal HttpMessage CreateGetStatusRequest(string indexerName, Guid? xMsClientR /// The name of the indexer for which to retrieve status. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public async ValueTask> GetStatusAsync(string indexerName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public async ValueTask> GetStatusAsync(string indexerName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (indexerName == null) { @@ -759,7 +759,7 @@ public async ValueTask> GetStatusAsync(string ind /// The name of the indexer for which to retrieve status. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public Response GetStatus(string indexerName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public Response GetStatus(string indexerName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (indexerName == null) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Operations/IndexesClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/Operations/IndexesClient.cs index 3d08dcf8424c..d5bd1f0aa721 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Operations/IndexesClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Operations/IndexesClient.cs @@ -32,28 +32,28 @@ internal IndexesClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipelin } /// Creates a new search index. - /// The tracking ID sent with the request to help with debugging. /// The definition of the index to create. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual async Task> CreateAsync(Guid? xMsClientRequestId, SearchIndex index, CancellationToken cancellationToken = default) + public virtual async Task> CreateAsync(SearchIndex index, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { - return await RestClient.CreateAsync(xMsClientRequestId, index, cancellationToken).ConfigureAwait(false); + return await RestClient.CreateAsync(index, xMsClientRequestId, cancellationToken).ConfigureAwait(false); } /// Creates a new search index. - /// The tracking ID sent with the request to help with debugging. /// The definition of the index to create. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual Response Create(Guid? xMsClientRequestId, SearchIndex index, CancellationToken cancellationToken = default) + public virtual Response Create(SearchIndex index, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { - return RestClient.Create(xMsClientRequestId, index, cancellationToken); + return RestClient.Create(index, xMsClientRequestId, cancellationToken); } /// Lists all indexes available for a search service. /// Selects which top-level properties of the index definitions to retrieve. Specified as a comma-separated list of JSON property names, or '*' for all properties. The default is all properties. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual async Task> ListAsync(string select, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual async Task> ListAsync(string select = null, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return await RestClient.ListAsync(select, xMsClientRequestId, cancellationToken).ConfigureAwait(false); } @@ -62,35 +62,35 @@ public virtual async Task> ListAsync(string select, /// Selects which top-level properties of the index definitions to retrieve. Specified as a comma-separated list of JSON property names, or '*' for all properties. The default is all properties. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual Response List(string select, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual Response List(string select = null, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return RestClient.List(select, xMsClientRequestId, cancellationToken); } /// Creates a new search index or updates an index if it already exists. /// The definition of the index to create or update. + /// The definition of the index to create or update. /// Allows new analyzers, tokenizers, token filters, or char filters to be added to an index by taking the index offline for at least a few seconds. This temporarily causes indexing and query requests to fail. Performance and write availability of the index can be impaired for several minutes after the index is updated, or longer for very large indexes. /// The tracking ID sent with the request to help with debugging. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// The definition of the index to create or update. /// The cancellation token to use. - public virtual async Task> CreateOrUpdateAsync(string indexName, bool? allowIndexDowntime, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, SearchIndex index, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(string indexName, SearchIndex index, bool? allowIndexDowntime = null, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { - return await RestClient.CreateOrUpdateAsync(indexName, allowIndexDowntime, xMsClientRequestId, ifMatch, ifNoneMatch, index, cancellationToken).ConfigureAwait(false); + return await RestClient.CreateOrUpdateAsync(indexName, index, allowIndexDowntime, xMsClientRequestId, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); } /// Creates a new search index or updates an index if it already exists. /// The definition of the index to create or update. + /// The definition of the index to create or update. /// Allows new analyzers, tokenizers, token filters, or char filters to be added to an index by taking the index offline for at least a few seconds. This temporarily causes indexing and query requests to fail. Performance and write availability of the index can be impaired for several minutes after the index is updated, or longer for very large indexes. /// The tracking ID sent with the request to help with debugging. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// The definition of the index to create or update. /// The cancellation token to use. - public virtual Response CreateOrUpdate(string indexName, bool? allowIndexDowntime, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, SearchIndex index, CancellationToken cancellationToken = default) + public virtual Response CreateOrUpdate(string indexName, SearchIndex index, bool? allowIndexDowntime = null, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { - return RestClient.CreateOrUpdate(indexName, allowIndexDowntime, xMsClientRequestId, ifMatch, ifNoneMatch, index, cancellationToken); + return RestClient.CreateOrUpdate(indexName, index, allowIndexDowntime, xMsClientRequestId, ifMatch, ifNoneMatch, cancellationToken); } /// Deletes a search index and all the documents it contains. @@ -99,7 +99,7 @@ public virtual Response CreateOrUpdate(string indexName, bool? allo /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. /// The cancellation token to use. - public virtual async Task DeleteAsync(string indexName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, CancellationToken cancellationToken = default) + public virtual async Task DeleteAsync(string indexName, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { return await RestClient.DeleteAsync(indexName, xMsClientRequestId, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); } @@ -110,7 +110,7 @@ public virtual async Task DeleteAsync(string indexName, Guid? xMsClien /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. /// The cancellation token to use. - public virtual Response Delete(string indexName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, CancellationToken cancellationToken = default) + public virtual Response Delete(string indexName, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { return RestClient.Delete(indexName, xMsClientRequestId, ifMatch, ifNoneMatch, cancellationToken); } @@ -119,7 +119,7 @@ public virtual Response Delete(string indexName, Guid? xMsClientRequestId, strin /// The name of the index to retrieve. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual async Task> GetAsync(string indexName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string indexName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return await RestClient.GetAsync(indexName, xMsClientRequestId, cancellationToken).ConfigureAwait(false); } @@ -128,7 +128,7 @@ public virtual async Task> GetAsync(string indexName, Guid /// The name of the index to retrieve. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual Response Get(string indexName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual Response Get(string indexName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return RestClient.Get(indexName, xMsClientRequestId, cancellationToken); } @@ -137,7 +137,7 @@ public virtual Response Get(string indexName, Guid? xMsClientReques /// The name of the index for which to retrieve statistics. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual async Task> GetStatisticsAsync(string indexName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual async Task> GetStatisticsAsync(string indexName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return await RestClient.GetStatisticsAsync(indexName, xMsClientRequestId, cancellationToken).ConfigureAwait(false); } @@ -146,29 +146,29 @@ public virtual async Task> GetStatisticsAsync /// The name of the index for which to retrieve statistics. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual Response GetStatistics(string indexName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual Response GetStatistics(string indexName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return RestClient.GetStatistics(indexName, xMsClientRequestId, cancellationToken); } /// Shows how an analyzer breaks text into tokens. /// The name of the index for which to test an analyzer. - /// The tracking ID sent with the request to help with debugging. /// The text and analyzer or analysis components to test. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual async Task> AnalyzeAsync(string indexName, Guid? xMsClientRequestId, AnalyzeRequest request, CancellationToken cancellationToken = default) + public virtual async Task> AnalyzeAsync(string indexName, AnalyzeRequest request, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { - return await RestClient.AnalyzeAsync(indexName, xMsClientRequestId, request, cancellationToken).ConfigureAwait(false); + return await RestClient.AnalyzeAsync(indexName, request, xMsClientRequestId, cancellationToken).ConfigureAwait(false); } /// Shows how an analyzer breaks text into tokens. /// The name of the index for which to test an analyzer. - /// The tracking ID sent with the request to help with debugging. /// The text and analyzer or analysis components to test. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual Response Analyze(string indexName, Guid? xMsClientRequestId, AnalyzeRequest request, CancellationToken cancellationToken = default) + public virtual Response Analyze(string indexName, AnalyzeRequest request, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { - return RestClient.Analyze(indexName, xMsClientRequestId, request, cancellationToken); + return RestClient.Analyze(indexName, request, xMsClientRequestId, cancellationToken); } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Operations/IndexesRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/Operations/IndexesRestClient.cs index 9365e56a8fc0..fef936ad06ef 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Operations/IndexesRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Operations/IndexesRestClient.cs @@ -41,7 +41,7 @@ public IndexesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipel this.pipeline = pipeline; } - internal HttpMessage CreateCreateRequest(Guid? xMsClientRequestId, SearchIndex index) + internal HttpMessage CreateCreateRequest(SearchIndex index, Guid? xMsClientRequestId) { var message = pipeline.CreateMessage(); var request = message.Request; @@ -63,10 +63,10 @@ internal HttpMessage CreateCreateRequest(Guid? xMsClientRequestId, SearchIndex i } /// Creates a new search index. - /// The tracking ID sent with the request to help with debugging. /// The definition of the index to create. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public async ValueTask> CreateAsync(Guid? xMsClientRequestId, SearchIndex index, CancellationToken cancellationToken = default) + public async ValueTask> CreateAsync(SearchIndex index, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (index == null) { @@ -77,7 +77,7 @@ public async ValueTask> CreateAsync(Guid? xMsClientRequest scope.Start(); try { - using var message = CreateCreateRequest(xMsClientRequestId, index); + using var message = CreateCreateRequest(index, xMsClientRequestId); await pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -100,10 +100,10 @@ public async ValueTask> CreateAsync(Guid? xMsClientRequest } /// Creates a new search index. - /// The tracking ID sent with the request to help with debugging. /// The definition of the index to create. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public Response Create(Guid? xMsClientRequestId, SearchIndex index, CancellationToken cancellationToken = default) + public Response Create(SearchIndex index, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (index == null) { @@ -114,7 +114,7 @@ public Response Create(Guid? xMsClientRequestId, SearchIndex index, scope.Start(); try { - using var message = CreateCreateRequest(xMsClientRequestId, index); + using var message = CreateCreateRequest(index, xMsClientRequestId); pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -161,7 +161,7 @@ internal HttpMessage CreateListRequest(string select, Guid? xMsClientRequestId) /// Selects which top-level properties of the index definitions to retrieve. Specified as a comma-separated list of JSON property names, or '*' for all properties. The default is all properties. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public async ValueTask> ListAsync(string select, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public async ValueTask> ListAsync(string select = null, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { using var scope = clientDiagnostics.CreateScope("IndexesClient.List"); scope.Start(); @@ -193,7 +193,7 @@ public async ValueTask> ListAsync(string select, Gui /// Selects which top-level properties of the index definitions to retrieve. Specified as a comma-separated list of JSON property names, or '*' for all properties. The default is all properties. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public Response List(string select, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public Response List(string select = null, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { using var scope = clientDiagnostics.CreateScope("IndexesClient.List"); scope.Start(); @@ -221,7 +221,7 @@ public Response List(string select, Guid? xMsClientRequestId, } } - internal HttpMessage CreateCreateOrUpdateRequest(string indexName, bool? allowIndexDowntime, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, SearchIndex index) + internal HttpMessage CreateCreateOrUpdateRequest(string indexName, SearchIndex index, bool? allowIndexDowntime, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch) { var message = pipeline.CreateMessage(); var request = message.Request; @@ -259,13 +259,13 @@ internal HttpMessage CreateCreateOrUpdateRequest(string indexName, bool? allowIn /// Creates a new search index or updates an index if it already exists. /// The definition of the index to create or update. + /// The definition of the index to create or update. /// Allows new analyzers, tokenizers, token filters, or char filters to be added to an index by taking the index offline for at least a few seconds. This temporarily causes indexing and query requests to fail. Performance and write availability of the index can be impaired for several minutes after the index is updated, or longer for very large indexes. /// The tracking ID sent with the request to help with debugging. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// The definition of the index to create or update. /// The cancellation token to use. - public async ValueTask> CreateOrUpdateAsync(string indexName, bool? allowIndexDowntime, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, SearchIndex index, CancellationToken cancellationToken = default) + public async ValueTask> CreateOrUpdateAsync(string indexName, SearchIndex index, bool? allowIndexDowntime = null, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (indexName == null) { @@ -280,7 +280,7 @@ public async ValueTask> CreateOrUpdateAsync(string indexNa scope.Start(); try { - using var message = CreateCreateOrUpdateRequest(indexName, allowIndexDowntime, xMsClientRequestId, ifMatch, ifNoneMatch, index); + using var message = CreateCreateOrUpdateRequest(indexName, index, allowIndexDowntime, xMsClientRequestId, ifMatch, ifNoneMatch); await pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -305,13 +305,13 @@ public async ValueTask> CreateOrUpdateAsync(string indexNa /// Creates a new search index or updates an index if it already exists. /// The definition of the index to create or update. + /// The definition of the index to create or update. /// Allows new analyzers, tokenizers, token filters, or char filters to be added to an index by taking the index offline for at least a few seconds. This temporarily causes indexing and query requests to fail. Performance and write availability of the index can be impaired for several minutes after the index is updated, or longer for very large indexes. /// The tracking ID sent with the request to help with debugging. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// The definition of the index to create or update. /// The cancellation token to use. - public Response CreateOrUpdate(string indexName, bool? allowIndexDowntime, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, SearchIndex index, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string indexName, SearchIndex index, bool? allowIndexDowntime = null, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (indexName == null) { @@ -326,7 +326,7 @@ public Response CreateOrUpdate(string indexName, bool? allowIndexDo scope.Start(); try { - using var message = CreateCreateOrUpdateRequest(indexName, allowIndexDowntime, xMsClientRequestId, ifMatch, ifNoneMatch, index); + using var message = CreateCreateOrUpdateRequest(indexName, index, allowIndexDowntime, xMsClientRequestId, ifMatch, ifNoneMatch); pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -382,7 +382,7 @@ internal HttpMessage CreateDeleteRequest(string indexName, Guid? xMsClientReques /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. /// The cancellation token to use. - public async ValueTask DeleteAsync(string indexName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, CancellationToken cancellationToken = default) + public async ValueTask DeleteAsync(string indexName, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (indexName == null) { @@ -417,7 +417,7 @@ public async ValueTask DeleteAsync(string indexName, Guid? xMsClientRe /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. /// The cancellation token to use. - public Response Delete(string indexName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, CancellationToken cancellationToken = default) + public Response Delete(string indexName, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (indexName == null) { @@ -469,7 +469,7 @@ internal HttpMessage CreateGetRequest(string indexName, Guid? xMsClientRequestId /// The name of the index to retrieve. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public async ValueTask> GetAsync(string indexName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public async ValueTask> GetAsync(string indexName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (indexName == null) { @@ -506,7 +506,7 @@ public async ValueTask> GetAsync(string indexName, Guid? x /// The name of the index to retrieve. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public Response Get(string indexName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public Response Get(string indexName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (indexName == null) { @@ -562,7 +562,7 @@ internal HttpMessage CreateGetStatisticsRequest(string indexName, Guid? xMsClien /// The name of the index for which to retrieve statistics. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public async ValueTask> GetStatisticsAsync(string indexName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public async ValueTask> GetStatisticsAsync(string indexName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (indexName == null) { @@ -599,7 +599,7 @@ public async ValueTask> GetStatisticsAsync(st /// The name of the index for which to retrieve statistics. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public Response GetStatistics(string indexName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public Response GetStatistics(string indexName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (indexName == null) { @@ -632,7 +632,7 @@ public Response GetStatistics(string indexName, Guid? } } - internal HttpMessage CreateAnalyzeRequest(string indexName, Guid? xMsClientRequestId, AnalyzeRequest request) + internal HttpMessage CreateAnalyzeRequest(string indexName, AnalyzeRequest request, Guid? xMsClientRequestId) { var message = pipeline.CreateMessage(); var request0 = message.Request; @@ -657,10 +657,10 @@ internal HttpMessage CreateAnalyzeRequest(string indexName, Guid? xMsClientReque /// Shows how an analyzer breaks text into tokens. /// The name of the index for which to test an analyzer. - /// The tracking ID sent with the request to help with debugging. /// The text and analyzer or analysis components to test. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public async ValueTask> AnalyzeAsync(string indexName, Guid? xMsClientRequestId, AnalyzeRequest request, CancellationToken cancellationToken = default) + public async ValueTask> AnalyzeAsync(string indexName, AnalyzeRequest request, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (indexName == null) { @@ -675,7 +675,7 @@ public async ValueTask> AnalyzeAsync(string indexName, G scope.Start(); try { - using var message = CreateAnalyzeRequest(indexName, xMsClientRequestId, request); + using var message = CreateAnalyzeRequest(indexName, request, xMsClientRequestId); await pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -699,10 +699,10 @@ public async ValueTask> AnalyzeAsync(string indexName, G /// Shows how an analyzer breaks text into tokens. /// The name of the index for which to test an analyzer. - /// The tracking ID sent with the request to help with debugging. /// The text and analyzer or analysis components to test. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public Response Analyze(string indexName, Guid? xMsClientRequestId, AnalyzeRequest request, CancellationToken cancellationToken = default) + public Response Analyze(string indexName, AnalyzeRequest request, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (indexName == null) { @@ -717,7 +717,7 @@ public Response Analyze(string indexName, Guid? xMsClientRequestI scope.Start(); try { - using var message = CreateAnalyzeRequest(indexName, xMsClientRequestId, request); + using var message = CreateAnalyzeRequest(indexName, request, xMsClientRequestId); pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Operations/ServiceClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/Operations/ServiceClient.cs index b6f057c72f61..bc6c541c473f 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Operations/ServiceClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Operations/ServiceClient.cs @@ -34,7 +34,7 @@ internal ServiceClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipelin /// Gets service level statistics for a search service. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual async Task> GetServiceStatisticsAsync(Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual async Task> GetServiceStatisticsAsync(Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return await RestClient.GetServiceStatisticsAsync(xMsClientRequestId, cancellationToken).ConfigureAwait(false); } @@ -42,7 +42,7 @@ public virtual async Task> GetServiceStatistic /// Gets service level statistics for a search service. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual Response GetServiceStatistics(Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual Response GetServiceStatistics(Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return RestClient.GetServiceStatistics(xMsClientRequestId, cancellationToken); } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Operations/ServiceRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/Operations/ServiceRestClient.cs index d7a4b9692fe0..81e66a798cf6 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Operations/ServiceRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Operations/ServiceRestClient.cs @@ -61,7 +61,7 @@ internal HttpMessage CreateGetServiceStatisticsRequest(Guid? xMsClientRequestId) /// Gets service level statistics for a search service. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public async ValueTask> GetServiceStatisticsAsync(Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public async ValueTask> GetServiceStatisticsAsync(Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { using var scope = clientDiagnostics.CreateScope("ServiceClient.GetServiceStatistics"); scope.Start(); @@ -92,7 +92,7 @@ public async ValueTask> GetServiceStatisticsAs /// Gets service level statistics for a search service. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public Response GetServiceStatistics(Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public Response GetServiceStatistics(Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { using var scope = clientDiagnostics.CreateScope("ServiceClient.GetServiceStatistics"); scope.Start(); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Operations/SkillsetsClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/Operations/SkillsetsClient.cs index 5e801c4e527f..d65a8c50783b 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Operations/SkillsetsClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Operations/SkillsetsClient.cs @@ -33,26 +33,26 @@ internal SkillsetsClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipel /// Creates a new skillset in a search service or updates the skillset if it already exists. /// The name of the skillset to create or update. + /// The skillset containing one or more skills to create or update in a search service. /// The tracking ID sent with the request to help with debugging. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// The skillset containing one or more skills to create or update in a search service. /// The cancellation token to use. - public virtual async Task> CreateOrUpdateAsync(string skillsetName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, Skillset skillset, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(string skillsetName, Skillset skillset, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { - return await RestClient.CreateOrUpdateAsync(skillsetName, xMsClientRequestId, ifMatch, ifNoneMatch, skillset, cancellationToken).ConfigureAwait(false); + return await RestClient.CreateOrUpdateAsync(skillsetName, skillset, xMsClientRequestId, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); } /// Creates a new skillset in a search service or updates the skillset if it already exists. /// The name of the skillset to create or update. + /// The skillset containing one or more skills to create or update in a search service. /// The tracking ID sent with the request to help with debugging. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// The skillset containing one or more skills to create or update in a search service. /// The cancellation token to use. - public virtual Response CreateOrUpdate(string skillsetName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, Skillset skillset, CancellationToken cancellationToken = default) + public virtual Response CreateOrUpdate(string skillsetName, Skillset skillset, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { - return RestClient.CreateOrUpdate(skillsetName, xMsClientRequestId, ifMatch, ifNoneMatch, skillset, cancellationToken); + return RestClient.CreateOrUpdate(skillsetName, skillset, xMsClientRequestId, ifMatch, ifNoneMatch, cancellationToken); } /// Deletes a skillset in a search service. @@ -61,7 +61,7 @@ public virtual Response CreateOrUpdate(string skillsetName, Guid? xMsC /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. /// The cancellation token to use. - public virtual async Task DeleteAsync(string skillsetName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, CancellationToken cancellationToken = default) + public virtual async Task DeleteAsync(string skillsetName, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { return await RestClient.DeleteAsync(skillsetName, xMsClientRequestId, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); } @@ -72,7 +72,7 @@ public virtual async Task DeleteAsync(string skillsetName, Guid? xMsCl /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. /// The cancellation token to use. - public virtual Response Delete(string skillsetName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, CancellationToken cancellationToken = default) + public virtual Response Delete(string skillsetName, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { return RestClient.Delete(skillsetName, xMsClientRequestId, ifMatch, ifNoneMatch, cancellationToken); } @@ -81,7 +81,7 @@ public virtual Response Delete(string skillsetName, Guid? xMsClientRequestId, st /// The name of the skillset to retrieve. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual async Task> GetAsync(string skillsetName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string skillsetName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return await RestClient.GetAsync(skillsetName, xMsClientRequestId, cancellationToken).ConfigureAwait(false); } @@ -90,7 +90,7 @@ public virtual async Task> GetAsync(string skillsetName, Guid /// The name of the skillset to retrieve. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual Response Get(string skillsetName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual Response Get(string skillsetName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return RestClient.Get(skillsetName, xMsClientRequestId, cancellationToken); } @@ -99,7 +99,7 @@ public virtual Response Get(string skillsetName, Guid? xMsClientReques /// Selects which top-level properties of the skillsets to retrieve. Specified as a comma-separated list of JSON property names, or '*' for all properties. The default is all properties. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual async Task> ListAsync(string select, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual async Task> ListAsync(string select = null, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return await RestClient.ListAsync(select, xMsClientRequestId, cancellationToken).ConfigureAwait(false); } @@ -108,27 +108,27 @@ public virtual async Task> ListAsync(string select /// Selects which top-level properties of the skillsets to retrieve. Specified as a comma-separated list of JSON property names, or '*' for all properties. The default is all properties. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual Response List(string select, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual Response List(string select = null, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return RestClient.List(select, xMsClientRequestId, cancellationToken); } /// Creates a new skillset in a search service. - /// The tracking ID sent with the request to help with debugging. /// The skillset containing one or more skills to create in a search service. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual async Task> CreateAsync(Guid? xMsClientRequestId, Skillset skillset, CancellationToken cancellationToken = default) + public virtual async Task> CreateAsync(Skillset skillset, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { - return await RestClient.CreateAsync(xMsClientRequestId, skillset, cancellationToken).ConfigureAwait(false); + return await RestClient.CreateAsync(skillset, xMsClientRequestId, cancellationToken).ConfigureAwait(false); } /// Creates a new skillset in a search service. - /// The tracking ID sent with the request to help with debugging. /// The skillset containing one or more skills to create in a search service. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual Response Create(Guid? xMsClientRequestId, Skillset skillset, CancellationToken cancellationToken = default) + public virtual Response Create(Skillset skillset, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { - return RestClient.Create(xMsClientRequestId, skillset, cancellationToken); + return RestClient.Create(skillset, xMsClientRequestId, cancellationToken); } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Operations/SkillsetsRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/Operations/SkillsetsRestClient.cs index c9045d352b26..bb9c4370181b 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Operations/SkillsetsRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Operations/SkillsetsRestClient.cs @@ -41,7 +41,7 @@ public SkillsetsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pip this.pipeline = pipeline; } - internal HttpMessage CreateCreateOrUpdateRequest(string skillsetName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, Skillset skillset) + internal HttpMessage CreateCreateOrUpdateRequest(string skillsetName, Skillset skillset, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch) { var message = pipeline.CreateMessage(); var request = message.Request; @@ -75,12 +75,12 @@ internal HttpMessage CreateCreateOrUpdateRequest(string skillsetName, Guid? xMsC /// Creates a new skillset in a search service or updates the skillset if it already exists. /// The name of the skillset to create or update. + /// The skillset containing one or more skills to create or update in a search service. /// The tracking ID sent with the request to help with debugging. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// The skillset containing one or more skills to create or update in a search service. /// The cancellation token to use. - public async ValueTask> CreateOrUpdateAsync(string skillsetName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, Skillset skillset, CancellationToken cancellationToken = default) + public async ValueTask> CreateOrUpdateAsync(string skillsetName, Skillset skillset, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (skillsetName == null) { @@ -95,7 +95,7 @@ public async ValueTask> CreateOrUpdateAsync(string skillsetNa scope.Start(); try { - using var message = CreateCreateOrUpdateRequest(skillsetName, xMsClientRequestId, ifMatch, ifNoneMatch, skillset); + using var message = CreateCreateOrUpdateRequest(skillsetName, skillset, xMsClientRequestId, ifMatch, ifNoneMatch); await pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -120,12 +120,12 @@ public async ValueTask> CreateOrUpdateAsync(string skillsetNa /// Creates a new skillset in a search service or updates the skillset if it already exists. /// The name of the skillset to create or update. + /// The skillset containing one or more skills to create or update in a search service. /// The tracking ID sent with the request to help with debugging. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// The skillset containing one or more skills to create or update in a search service. /// The cancellation token to use. - public Response CreateOrUpdate(string skillsetName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, Skillset skillset, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string skillsetName, Skillset skillset, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (skillsetName == null) { @@ -140,7 +140,7 @@ public Response CreateOrUpdate(string skillsetName, Guid? xMsClientReq scope.Start(); try { - using var message = CreateCreateOrUpdateRequest(skillsetName, xMsClientRequestId, ifMatch, ifNoneMatch, skillset); + using var message = CreateCreateOrUpdateRequest(skillsetName, skillset, xMsClientRequestId, ifMatch, ifNoneMatch); pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -196,7 +196,7 @@ internal HttpMessage CreateDeleteRequest(string skillsetName, Guid? xMsClientReq /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. /// The cancellation token to use. - public async ValueTask DeleteAsync(string skillsetName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, CancellationToken cancellationToken = default) + public async ValueTask DeleteAsync(string skillsetName, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (skillsetName == null) { @@ -231,7 +231,7 @@ public async ValueTask DeleteAsync(string skillsetName, Guid? xMsClien /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. /// The cancellation token to use. - public Response Delete(string skillsetName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, CancellationToken cancellationToken = default) + public Response Delete(string skillsetName, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (skillsetName == null) { @@ -283,7 +283,7 @@ internal HttpMessage CreateGetRequest(string skillsetName, Guid? xMsClientReques /// The name of the skillset to retrieve. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public async ValueTask> GetAsync(string skillsetName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public async ValueTask> GetAsync(string skillsetName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (skillsetName == null) { @@ -320,7 +320,7 @@ public async ValueTask> GetAsync(string skillsetName, Guid? x /// The name of the skillset to retrieve. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public Response Get(string skillsetName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public Response Get(string skillsetName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (skillsetName == null) { @@ -378,7 +378,7 @@ internal HttpMessage CreateListRequest(string select, Guid? xMsClientRequestId) /// Selects which top-level properties of the skillsets to retrieve. Specified as a comma-separated list of JSON property names, or '*' for all properties. The default is all properties. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public async ValueTask> ListAsync(string select, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public async ValueTask> ListAsync(string select = null, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { using var scope = clientDiagnostics.CreateScope("SkillsetsClient.List"); scope.Start(); @@ -410,7 +410,7 @@ public async ValueTask> ListAsync(string select, G /// Selects which top-level properties of the skillsets to retrieve. Specified as a comma-separated list of JSON property names, or '*' for all properties. The default is all properties. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public Response List(string select, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public Response List(string select = null, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { using var scope = clientDiagnostics.CreateScope("SkillsetsClient.List"); scope.Start(); @@ -438,7 +438,7 @@ public Response List(string select, Guid? xMsClientRequestI } } - internal HttpMessage CreateCreateRequest(Guid? xMsClientRequestId, Skillset skillset) + internal HttpMessage CreateCreateRequest(Skillset skillset, Guid? xMsClientRequestId) { var message = pipeline.CreateMessage(); var request = message.Request; @@ -460,10 +460,10 @@ internal HttpMessage CreateCreateRequest(Guid? xMsClientRequestId, Skillset skil } /// Creates a new skillset in a search service. - /// The tracking ID sent with the request to help with debugging. /// The skillset containing one or more skills to create in a search service. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public async ValueTask> CreateAsync(Guid? xMsClientRequestId, Skillset skillset, CancellationToken cancellationToken = default) + public async ValueTask> CreateAsync(Skillset skillset, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (skillset == null) { @@ -474,7 +474,7 @@ public async ValueTask> CreateAsync(Guid? xMsClientRequestId, scope.Start(); try { - using var message = CreateCreateRequest(xMsClientRequestId, skillset); + using var message = CreateCreateRequest(skillset, xMsClientRequestId); await pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -497,10 +497,10 @@ public async ValueTask> CreateAsync(Guid? xMsClientRequestId, } /// Creates a new skillset in a search service. - /// The tracking ID sent with the request to help with debugging. /// The skillset containing one or more skills to create in a search service. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public Response Create(Guid? xMsClientRequestId, Skillset skillset, CancellationToken cancellationToken = default) + public Response Create(Skillset skillset, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (skillset == null) { @@ -511,7 +511,7 @@ public Response Create(Guid? xMsClientRequestId, Skillset skillset, Ca scope.Start(); try { - using var message = CreateCreateRequest(xMsClientRequestId, skillset); + using var message = CreateCreateRequest(skillset, xMsClientRequestId); pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Operations/SynonymMapsClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/Operations/SynonymMapsClient.cs index df9c71b290e3..4bdd3c5d9e72 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Operations/SynonymMapsClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Operations/SynonymMapsClient.cs @@ -33,26 +33,26 @@ internal SynonymMapsClient(ClientDiagnostics clientDiagnostics, HttpPipeline pip /// Creates a new synonym map or updates a synonym map if it already exists. /// The name of the synonym map to create or update. + /// The definition of the synonym map to create or update. /// The tracking ID sent with the request to help with debugging. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// The definition of the synonym map to create or update. /// The cancellation token to use. - public virtual async Task> CreateOrUpdateAsync(string synonymMapName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, SynonymMap synonymMap, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(string synonymMapName, SynonymMap synonymMap, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { - return await RestClient.CreateOrUpdateAsync(synonymMapName, xMsClientRequestId, ifMatch, ifNoneMatch, synonymMap, cancellationToken).ConfigureAwait(false); + return await RestClient.CreateOrUpdateAsync(synonymMapName, synonymMap, xMsClientRequestId, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); } /// Creates a new synonym map or updates a synonym map if it already exists. /// The name of the synonym map to create or update. + /// The definition of the synonym map to create or update. /// The tracking ID sent with the request to help with debugging. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// The definition of the synonym map to create or update. /// The cancellation token to use. - public virtual Response CreateOrUpdate(string synonymMapName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, SynonymMap synonymMap, CancellationToken cancellationToken = default) + public virtual Response CreateOrUpdate(string synonymMapName, SynonymMap synonymMap, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { - return RestClient.CreateOrUpdate(synonymMapName, xMsClientRequestId, ifMatch, ifNoneMatch, synonymMap, cancellationToken); + return RestClient.CreateOrUpdate(synonymMapName, synonymMap, xMsClientRequestId, ifMatch, ifNoneMatch, cancellationToken); } /// Deletes a synonym map. @@ -61,7 +61,7 @@ public virtual Response CreateOrUpdate(string synonymMapName, Guid? /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. /// The cancellation token to use. - public virtual async Task DeleteAsync(string synonymMapName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, CancellationToken cancellationToken = default) + public virtual async Task DeleteAsync(string synonymMapName, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { return await RestClient.DeleteAsync(synonymMapName, xMsClientRequestId, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); } @@ -72,7 +72,7 @@ public virtual async Task DeleteAsync(string synonymMapName, Guid? xMs /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. /// The cancellation token to use. - public virtual Response Delete(string synonymMapName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, CancellationToken cancellationToken = default) + public virtual Response Delete(string synonymMapName, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { return RestClient.Delete(synonymMapName, xMsClientRequestId, ifMatch, ifNoneMatch, cancellationToken); } @@ -81,7 +81,7 @@ public virtual Response Delete(string synonymMapName, Guid? xMsClientRequestId, /// The name of the synonym map to retrieve. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual async Task> GetAsync(string synonymMapName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string synonymMapName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return await RestClient.GetAsync(synonymMapName, xMsClientRequestId, cancellationToken).ConfigureAwait(false); } @@ -90,7 +90,7 @@ public virtual async Task> GetAsync(string synonymMapName, /// The name of the synonym map to retrieve. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual Response Get(string synonymMapName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual Response Get(string synonymMapName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return RestClient.Get(synonymMapName, xMsClientRequestId, cancellationToken); } @@ -99,7 +99,7 @@ public virtual Response Get(string synonymMapName, Guid? xMsClientRe /// Selects which top-level properties of the synonym maps to retrieve. Specified as a comma-separated list of JSON property names, or '*' for all properties. The default is all properties. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual async Task> ListAsync(string select, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual async Task> ListAsync(string select = null, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return await RestClient.ListAsync(select, xMsClientRequestId, cancellationToken).ConfigureAwait(false); } @@ -108,27 +108,27 @@ public virtual async Task> ListAsync(string sele /// Selects which top-level properties of the synonym maps to retrieve. Specified as a comma-separated list of JSON property names, or '*' for all properties. The default is all properties. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual Response List(string select, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public virtual Response List(string select = null, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { return RestClient.List(select, xMsClientRequestId, cancellationToken); } /// Creates a new synonym map. - /// The tracking ID sent with the request to help with debugging. /// The definition of the synonym map to create. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual async Task> CreateAsync(Guid? xMsClientRequestId, SynonymMap synonymMap, CancellationToken cancellationToken = default) + public virtual async Task> CreateAsync(SynonymMap synonymMap, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { - return await RestClient.CreateAsync(xMsClientRequestId, synonymMap, cancellationToken).ConfigureAwait(false); + return await RestClient.CreateAsync(synonymMap, xMsClientRequestId, cancellationToken).ConfigureAwait(false); } /// Creates a new synonym map. - /// The tracking ID sent with the request to help with debugging. /// The definition of the synonym map to create. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public virtual Response Create(Guid? xMsClientRequestId, SynonymMap synonymMap, CancellationToken cancellationToken = default) + public virtual Response Create(SynonymMap synonymMap, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { - return RestClient.Create(xMsClientRequestId, synonymMap, cancellationToken); + return RestClient.Create(synonymMap, xMsClientRequestId, cancellationToken); } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Operations/SynonymMapsRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/Operations/SynonymMapsRestClient.cs index 7bc365f868c2..0c0733f3ba6a 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Operations/SynonymMapsRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Operations/SynonymMapsRestClient.cs @@ -41,7 +41,7 @@ public SynonymMapsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline p this.pipeline = pipeline; } - internal HttpMessage CreateCreateOrUpdateRequest(string synonymMapName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, SynonymMap synonymMap) + internal HttpMessage CreateCreateOrUpdateRequest(string synonymMapName, SynonymMap synonymMap, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch) { var message = pipeline.CreateMessage(); var request = message.Request; @@ -75,12 +75,12 @@ internal HttpMessage CreateCreateOrUpdateRequest(string synonymMapName, Guid? xM /// Creates a new synonym map or updates a synonym map if it already exists. /// The name of the synonym map to create or update. + /// The definition of the synonym map to create or update. /// The tracking ID sent with the request to help with debugging. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// The definition of the synonym map to create or update. /// The cancellation token to use. - public async ValueTask> CreateOrUpdateAsync(string synonymMapName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, SynonymMap synonymMap, CancellationToken cancellationToken = default) + public async ValueTask> CreateOrUpdateAsync(string synonymMapName, SynonymMap synonymMap, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (synonymMapName == null) { @@ -95,7 +95,7 @@ public async ValueTask> CreateOrUpdateAsync(string synonymM scope.Start(); try { - using var message = CreateCreateOrUpdateRequest(synonymMapName, xMsClientRequestId, ifMatch, ifNoneMatch, synonymMap); + using var message = CreateCreateOrUpdateRequest(synonymMapName, synonymMap, xMsClientRequestId, ifMatch, ifNoneMatch); await pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -120,12 +120,12 @@ public async ValueTask> CreateOrUpdateAsync(string synonymM /// Creates a new synonym map or updates a synonym map if it already exists. /// The name of the synonym map to create or update. + /// The definition of the synonym map to create or update. /// The tracking ID sent with the request to help with debugging. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// The definition of the synonym map to create or update. /// The cancellation token to use. - public Response CreateOrUpdate(string synonymMapName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, SynonymMap synonymMap, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string synonymMapName, SynonymMap synonymMap, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (synonymMapName == null) { @@ -140,7 +140,7 @@ public Response CreateOrUpdate(string synonymMapName, Guid? xMsClien scope.Start(); try { - using var message = CreateCreateOrUpdateRequest(synonymMapName, xMsClientRequestId, ifMatch, ifNoneMatch, synonymMap); + using var message = CreateCreateOrUpdateRequest(synonymMapName, synonymMap, xMsClientRequestId, ifMatch, ifNoneMatch); pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -196,7 +196,7 @@ internal HttpMessage CreateDeleteRequest(string synonymMapName, Guid? xMsClientR /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. /// The cancellation token to use. - public async ValueTask DeleteAsync(string synonymMapName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, CancellationToken cancellationToken = default) + public async ValueTask DeleteAsync(string synonymMapName, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (synonymMapName == null) { @@ -231,7 +231,7 @@ public async ValueTask DeleteAsync(string synonymMapName, Guid? xMsCli /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. /// The cancellation token to use. - public Response Delete(string synonymMapName, Guid? xMsClientRequestId, string ifMatch, string ifNoneMatch, CancellationToken cancellationToken = default) + public Response Delete(string synonymMapName, Guid? xMsClientRequestId = null, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (synonymMapName == null) { @@ -283,7 +283,7 @@ internal HttpMessage CreateGetRequest(string synonymMapName, Guid? xMsClientRequ /// The name of the synonym map to retrieve. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public async ValueTask> GetAsync(string synonymMapName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public async ValueTask> GetAsync(string synonymMapName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (synonymMapName == null) { @@ -320,7 +320,7 @@ public async ValueTask> GetAsync(string synonymMapName, Gui /// The name of the synonym map to retrieve. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public Response Get(string synonymMapName, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public Response Get(string synonymMapName, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (synonymMapName == null) { @@ -378,7 +378,7 @@ internal HttpMessage CreateListRequest(string select, Guid? xMsClientRequestId) /// Selects which top-level properties of the synonym maps to retrieve. Specified as a comma-separated list of JSON property names, or '*' for all properties. The default is all properties. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public async ValueTask> ListAsync(string select, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public async ValueTask> ListAsync(string select = null, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { using var scope = clientDiagnostics.CreateScope("SynonymMapsClient.List"); scope.Start(); @@ -410,7 +410,7 @@ public async ValueTask> ListAsync(string select, /// Selects which top-level properties of the synonym maps to retrieve. Specified as a comma-separated list of JSON property names, or '*' for all properties. The default is all properties. /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public Response List(string select, Guid? xMsClientRequestId, CancellationToken cancellationToken = default) + public Response List(string select = null, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { using var scope = clientDiagnostics.CreateScope("SynonymMapsClient.List"); scope.Start(); @@ -438,7 +438,7 @@ public Response List(string select, Guid? xMsClientReques } } - internal HttpMessage CreateCreateRequest(Guid? xMsClientRequestId, SynonymMap synonymMap) + internal HttpMessage CreateCreateRequest(SynonymMap synonymMap, Guid? xMsClientRequestId) { var message = pipeline.CreateMessage(); var request = message.Request; @@ -460,10 +460,10 @@ internal HttpMessage CreateCreateRequest(Guid? xMsClientRequestId, SynonymMap sy } /// Creates a new synonym map. - /// The tracking ID sent with the request to help with debugging. /// The definition of the synonym map to create. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public async ValueTask> CreateAsync(Guid? xMsClientRequestId, SynonymMap synonymMap, CancellationToken cancellationToken = default) + public async ValueTask> CreateAsync(SynonymMap synonymMap, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (synonymMap == null) { @@ -474,7 +474,7 @@ public async ValueTask> CreateAsync(Guid? xMsClientRequestI scope.Start(); try { - using var message = CreateCreateRequest(xMsClientRequestId, synonymMap); + using var message = CreateCreateRequest(synonymMap, xMsClientRequestId); await pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -497,10 +497,10 @@ public async ValueTask> CreateAsync(Guid? xMsClientRequestI } /// Creates a new synonym map. - /// The tracking ID sent with the request to help with debugging. /// The definition of the synonym map to create. + /// The tracking ID sent with the request to help with debugging. /// The cancellation token to use. - public Response Create(Guid? xMsClientRequestId, SynonymMap synonymMap, CancellationToken cancellationToken = default) + public Response Create(SynonymMap synonymMap, Guid? xMsClientRequestId = null, CancellationToken cancellationToken = default) { if (synonymMap == null) { @@ -511,7 +511,7 @@ public Response Create(Guid? xMsClientRequestId, SynonymMap synonymM scope.Start(); try { - using var message = CreateCreateRequest(xMsClientRequestId, synonymMap); + using var message = CreateCreateRequest(synonymMap, xMsClientRequestId); pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/search/Azure.Search.Documents/src/SearchIndexClient.cs b/sdk/search/Azure.Search.Documents/src/SearchIndexClient.cs index 5707c8d6e957..54aa82c5185d 100644 --- a/sdk/search/Azure.Search.Documents/src/SearchIndexClient.cs +++ b/sdk/search/Azure.Search.Documents/src/SearchIndexClient.cs @@ -918,7 +918,7 @@ private async Task>> SearchInternal( scope.Start(); try { - using HttpMessage message = Protocol.CreateSearchPostRequest(options.ClientRequestId, options); + using HttpMessage message = Protocol.CreateSearchPostRequest(options, options.ClientRequestId); if (async) { await Pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); @@ -1187,7 +1187,7 @@ private async Task>> SuggestInternal( scope.Start(); try { - using HttpMessage message = Protocol.CreateSuggestPostRequest(options.ClientRequestId, options); + using HttpMessage message = Protocol.CreateSuggestPostRequest(options, options.ClientRequestId); if (async) { await Pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); @@ -1309,8 +1309,8 @@ private async Task> AutocompleteInternal( options.SuggesterName = suggesterName; return async ? - await Protocol.AutocompletePostAsync(options.ClientRequestId, options, cancellationToken).ConfigureAwait(false) : - Protocol.AutocompletePost(options.ClientRequestId, options, cancellationToken); + await Protocol.AutocompletePostAsync(options, options.ClientRequestId, cancellationToken).ConfigureAwait(false) : + Protocol.AutocompletePost(options, options.ClientRequestId, cancellationToken); } #endregion Autocomplete diff --git a/sdk/search/Azure.Search.Documents/src/SearchServiceClient.cs b/sdk/search/Azure.Search.Documents/src/SearchServiceClient.cs index 029b8412a6ac..bbae0cd536a9 100644 --- a/sdk/search/Azure.Search.Documents/src/SearchServiceClient.cs +++ b/sdk/search/Azure.Search.Documents/src/SearchServiceClient.cs @@ -291,8 +291,8 @@ public virtual Response CreateIndex( SearchRequestOptions options = null, CancellationToken cancellationToken = default) => IndexesClient.Create( - options?.ClientRequestId, index, + options?.ClientRequestId, cancellationToken); /// @@ -324,8 +324,8 @@ public virtual async Task> CreateIndexAsync( SearchRequestOptions options = null, CancellationToken cancellationToken = default) => await IndexesClient.CreateAsync( - options?.ClientRequestId, index, + options?.ClientRequestId, cancellationToken) .ConfigureAwait(false); diff --git a/sdk/template/Azure.Template/api/Azure.Template.netstandard2.0.cs b/sdk/template/Azure.Template/api/Azure.Template.netstandard2.0.cs index c4c5dbfc757b..9b8c4841e17f 100644 --- a/sdk/template/Azure.Template/api/Azure.Template.netstandard2.0.cs +++ b/sdk/template/Azure.Template/api/Azure.Template.netstandard2.0.cs @@ -5,8 +5,8 @@ public partial class TemplateClient protected TemplateClient() { } public TemplateClient(System.Uri endpoint) { } public TemplateClient(System.Uri endpoint, Azure.Template.TemplateClientOptions options) { } - public virtual Azure.Response Operation(Azure.Template.Models.Model body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> OperationAsync(Azure.Template.Models.Model body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Operation(Azure.Template.Models.Model body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> OperationAsync(Azure.Template.Models.Model body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class TemplateClientOptions : Azure.Core.ClientOptions { diff --git a/sdk/template/Azure.Template/src/Generated/Operations/ServiceRestClient.cs b/sdk/template/Azure.Template/src/Generated/Operations/ServiceRestClient.cs index 644637ecf67b..f3c0eb096a3e 100644 --- a/sdk/template/Azure.Template/src/Generated/Operations/ServiceRestClient.cs +++ b/sdk/template/Azure.Template/src/Generated/Operations/ServiceRestClient.cs @@ -56,7 +56,7 @@ internal HttpMessage CreateOperationRequest(Model body) /// The Model to use. /// The cancellation token to use. - public async ValueTask> OperationAsync(Model body, CancellationToken cancellationToken = default) + public async ValueTask> OperationAsync(Model body = null, CancellationToken cancellationToken = default) { using var scope = clientDiagnostics.CreateScope("ServiceClient.Operation"); scope.Start(); @@ -86,7 +86,7 @@ public async ValueTask> OperationAsync(Model body, CancellationT /// The Model to use. /// The cancellation token to use. - public Response Operation(Model body, CancellationToken cancellationToken = default) + public Response Operation(Model body = null, CancellationToken cancellationToken = default) { using var scope = clientDiagnostics.CreateScope("ServiceClient.Operation"); scope.Start(); diff --git a/sdk/template/Azure.Template/src/Generated/Operations/TemplateClient.cs b/sdk/template/Azure.Template/src/Generated/Operations/TemplateClient.cs index 135e5572232c..e58489c1c0bf 100644 --- a/sdk/template/Azure.Template/src/Generated/Operations/TemplateClient.cs +++ b/sdk/template/Azure.Template/src/Generated/Operations/TemplateClient.cs @@ -32,14 +32,14 @@ internal TemplateClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeli /// The Model to use. /// The cancellation token to use. - public virtual async Task> OperationAsync(Model body, CancellationToken cancellationToken = default) + public virtual async Task> OperationAsync(Model body = null, CancellationToken cancellationToken = default) { return await RestClient.OperationAsync(body, cancellationToken).ConfigureAwait(false); } /// The Model to use. /// The cancellation token to use. - public virtual Response Operation(Model body, CancellationToken cancellationToken = default) + public virtual Response Operation(Model body = null, CancellationToken cancellationToken = default) { return RestClient.Operation(body, cancellationToken); }