Skip to content

Commit 51f030b

Browse files
Update Autorest version to 20211207.1 (#25789)
* Update Autorest version to 20211207.1 * Build fix * Update package version * Build fix * Build fix
1 parent 18eff24 commit 51f030b

11 files changed

+128
-128
lines changed

eng/Packages.Data.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
All should have PrivateAssets="All" set so they don't become package dependencies
147147
-->
148148
<ItemGroup>
149-
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20211203.1" PrivateAssets="All" />
149+
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20211209.1" PrivateAssets="All" />
150150
<PackageReference Update="Azure.ClientSdk.Analyzers" Version="0.1.1-dev.20210903.4" PrivateAssets="All" />
151151
<PackageReference Update="coverlet.collector" Version="1.3.0" PrivateAssets="All" />
152152
<PackageReference Update="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.1" PrivateAssets="All" />

sdk/formrecognizer/Azure.AI.FormRecognizer/src/AnalyzeDocumentOperation.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ public override async ValueTask<Response> UpdateStatusAsync(CancellationToken ca
185185
async ValueTask<OperationState<AnalyzeResult>> IOperation<AnalyzeResult>.UpdateStateAsync(bool async, CancellationToken cancellationToken)
186186
{
187187
Response<AnalyzeResultOperation> response = async
188-
? await _serviceClient.DocumentAnalysisGetAnalyzeDocumentResultAsync(_modelId, _resultId, cancellationToken).ConfigureAwait(false)
189-
: _serviceClient.DocumentAnalysisGetAnalyzeDocumentResult(_modelId, _resultId, cancellationToken);
188+
? await _serviceClient.GetAnalyzeDocumentResultAsync(_modelId, _resultId, cancellationToken).ConfigureAwait(false)
189+
: _serviceClient.GetAnalyzeDocumentResult(_modelId, _resultId, cancellationToken);
190190

191191
AnalyzeResultOperationStatus status = response.Value.Status;
192192
Response rawResponse = response.GetRawResponse();

sdk/formrecognizer/Azure.AI.FormRecognizer/src/BuildModelOperation.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ public override async ValueTask<Response> UpdateStatusAsync(CancellationToken ca
155155
async ValueTask<OperationState<DocumentModel>> IOperation<DocumentModel>.UpdateStateAsync(bool async, CancellationToken cancellationToken)
156156
{
157157
Response<ModelOperation> response = async
158-
? await _serviceClient.DocumentAnalysisGetOperationAsync(Id, cancellationToken).ConfigureAwait(false)
159-
: _serviceClient.DocumentAnalysisGetOperation(Id, cancellationToken);
158+
? await _serviceClient.GetOperationAsync(Id, cancellationToken).ConfigureAwait(false)
159+
: _serviceClient.GetOperation(Id, cancellationToken);
160160

161161
DocumentOperationStatus status = response.Value.Status;
162162
Response rawResponse = response.GetRawResponse();

sdk/formrecognizer/Azure.AI.FormRecognizer/src/CopyModelOperation.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ public override async ValueTask<Response> UpdateStatusAsync(CancellationToken ca
160160
async ValueTask<OperationState<DocumentModel>> IOperation<DocumentModel>.UpdateStateAsync(bool async, CancellationToken cancellationToken)
161161
{
162162
Response<ModelOperation> response = async
163-
? await _serviceClient.DocumentAnalysisGetOperationAsync(Id, cancellationToken).ConfigureAwait(false)
164-
: _serviceClient.DocumentAnalysisGetOperation(Id, cancellationToken);
163+
? await _serviceClient.GetOperationAsync(Id, cancellationToken).ConfigureAwait(false)
164+
: _serviceClient.GetOperation(Id, cancellationToken);
165165

166166
DocumentOperationStatus status = response.Value.Status;
167167
Response rawResponse = response.GetRawResponse();

sdk/formrecognizer/Azure.AI.FormRecognizer/src/DocumentAnalysisClient.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public virtual async Task<AnalyzeDocumentOperation> StartAnalyzeDocumentAsync(st
141141

142142
try
143143
{
144-
var response = await ServiceClient.DocumentAnalysisAnalyzeDocumentAsync(
144+
var response = await ServiceClient.AnalyzeDocumentAsync(
145145
modelId,
146146
ContentType1.ApplicationOctetStream,
147147
analyzeDocumentOptions.Pages.Count == 0 ? null : string.Join(",", analyzeDocumentOptions.Pages),
@@ -191,7 +191,7 @@ public virtual AnalyzeDocumentOperation StartAnalyzeDocument(string modelId, Str
191191

192192
try
193193
{
194-
var response = ServiceClient.DocumentAnalysisAnalyzeDocument(
194+
var response = ServiceClient.AnalyzeDocument(
195195
modelId,
196196
ContentType1.ApplicationOctetStream,
197197
analyzeDocumentOptions.Pages.Count == 0 ? null : string.Join(",", analyzeDocumentOptions.Pages),
@@ -242,7 +242,7 @@ public virtual async Task<AnalyzeDocumentOperation> StartAnalyzeDocumentFromUriA
242242
try
243243
{
244244
var request = new AnalyzeDocumentRequest() { UrlSource = documentUri.AbsoluteUri };
245-
var response = await ServiceClient.DocumentAnalysisAnalyzeDocumentAsync(
245+
var response = await ServiceClient.AnalyzeDocumentAsync(
246246
modelId,
247247
analyzeDocumentOptions.Pages.Count == 0 ? null : string.Join(",", analyzeDocumentOptions.Pages),
248248
analyzeDocumentOptions.Locale,
@@ -292,7 +292,7 @@ public virtual AnalyzeDocumentOperation StartAnalyzeDocumentFromUri(string model
292292
try
293293
{
294294
var request = new AnalyzeDocumentRequest() { UrlSource = documentUri.AbsoluteUri };
295-
var response = ServiceClient.DocumentAnalysisAnalyzeDocument(
295+
var response = ServiceClient.AnalyzeDocument(
296296
modelId,
297297
analyzeDocumentOptions.Pages.Count == 0 ? null : string.Join(",", analyzeDocumentOptions.Pages),
298298
analyzeDocumentOptions.Locale,

sdk/formrecognizer/Azure.AI.FormRecognizer/src/DocumentModelAdministrationClient.cs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public virtual BuildModelOperation StartBuildModel(Uri trainingFilesUri, string
147147
Description = buildModelOptions.ModelDescription
148148
};
149149

150-
var response = ServiceClient.DocumentAnalysisBuildDocumentModel(request, cancellationToken);
150+
var response = ServiceClient.BuildDocumentModel(request, cancellationToken);
151151
return new BuildModelOperation(response.Headers.OperationLocation, response.GetRawResponse(), ServiceClient, Diagnostics);
152152
}
153153
catch (Exception e)
@@ -193,7 +193,7 @@ public virtual async Task<BuildModelOperation> StartBuildModelAsync(Uri training
193193
Description = buildModelOptions.ModelDescription
194194
};
195195

196-
var response = await ServiceClient.DocumentAnalysisBuildDocumentModelAsync(request, cancellationToken).ConfigureAwait(false);
196+
var response = await ServiceClient.BuildDocumentModelAsync(request, cancellationToken).ConfigureAwait(false);
197197
return new BuildModelOperation(response.Headers.OperationLocation, response.GetRawResponse(), ServiceClient, Diagnostics);
198198
}
199199
catch (Exception e)
@@ -222,7 +222,7 @@ public virtual Response<DocumentModel> GetModel(string modelId, CancellationToke
222222

223223
try
224224
{
225-
Response<DocumentModel> response = ServiceClient.DocumentAnalysisGetModel(modelId, cancellationToken);
225+
Response<DocumentModel> response = ServiceClient.GetModel(modelId, cancellationToken);
226226
return Response.FromValue(response.Value, response.GetRawResponse());
227227
}
228228
catch (Exception e)
@@ -248,7 +248,7 @@ public virtual async Task<Response<DocumentModel>> GetModelAsync(string modelId,
248248

249249
try
250250
{
251-
Response<DocumentModel> response = await ServiceClient.DocumentAnalysisGetModelAsync(modelId, cancellationToken).ConfigureAwait(false);
251+
Response<DocumentModel> response = await ServiceClient.GetModelAsync(modelId, cancellationToken).ConfigureAwait(false);
252252
return Response.FromValue(response.Value, response.GetRawResponse());
253253
}
254254
catch (Exception e)
@@ -273,7 +273,7 @@ public virtual Response DeleteModel(string modelId, CancellationToken cancellati
273273

274274
try
275275
{
276-
return ServiceClient.DocumentAnalysisDeleteModel(modelId, cancellationToken);
276+
return ServiceClient.DeleteModel(modelId, cancellationToken);
277277
}
278278
catch (Exception e)
279279
{
@@ -297,7 +297,7 @@ public virtual async Task<Response> DeleteModelAsync(string modelId, Cancellatio
297297

298298
try
299299
{
300-
return await ServiceClient.DocumentAnalysisDeleteModelAsync(modelId, cancellationToken).ConfigureAwait(false);
300+
return await ServiceClient.DeleteModelAsync(modelId, cancellationToken).ConfigureAwait(false);
301301
}
302302
catch (Exception e)
303303
{
@@ -320,7 +320,7 @@ Page<DocumentModelInfo> FirstPageFunc(int? pageSizeHint)
320320

321321
try
322322
{
323-
Response<GetModelsResponse> response = ServiceClient.DocumentAnalysisGetModels(cancellationToken);
323+
Response<GetModelsResponse> response = ServiceClient.GetModels(cancellationToken);
324324
return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
325325
}
326326
catch (Exception e)
@@ -337,7 +337,7 @@ Page<DocumentModelInfo> NextPageFunc(string nextLink, int? pageSizeHint)
337337

338338
try
339339
{
340-
Response<GetModelsResponse> response = ServiceClient.DocumentAnalysisGetModelsNextPage(nextLink, cancellationToken);
340+
Response<GetModelsResponse> response = ServiceClient.GetModelsNextPage(nextLink, cancellationToken);
341341
return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
342342
}
343343
catch (Exception e)
@@ -364,7 +364,7 @@ async Task<Page<DocumentModelInfo>> FirstPageFunc(int? pageSizeHint)
364364

365365
try
366366
{
367-
Response<GetModelsResponse> response = await ServiceClient.DocumentAnalysisGetModelsAsync(cancellationToken).ConfigureAwait(false);
367+
Response<GetModelsResponse> response = await ServiceClient.GetModelsAsync(cancellationToken).ConfigureAwait(false);
368368
return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
369369
}
370370
catch (Exception e)
@@ -381,7 +381,7 @@ async Task<Page<DocumentModelInfo>> NextPageFunc(string nextLink, int? pageSizeH
381381

382382
try
383383
{
384-
Response<GetModelsResponse> response = await ServiceClient.DocumentAnalysisGetModelsNextPageAsync(nextLink, cancellationToken).ConfigureAwait(false);
384+
Response<GetModelsResponse> response = await ServiceClient.GetModelsNextPageAsync(nextLink, cancellationToken).ConfigureAwait(false);
385385
return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
386386
}
387387
catch (Exception e)
@@ -407,7 +407,7 @@ public virtual Response<AccountProperties> GetAccountProperties(CancellationToke
407407

408408
try
409409
{
410-
Response<GetInfoResponse> response = ServiceClient.DocumentAnalysisGetInfo(cancellationToken);
410+
Response<GetInfoResponse> response = ServiceClient.GetInfo(cancellationToken);
411411
return Response.FromValue(response.Value.CustomDocumentModels, response.GetRawResponse());
412412
}
413413
catch (Exception e)
@@ -430,7 +430,7 @@ public virtual async Task<Response<AccountProperties>> GetAccountPropertiesAsync
430430

431431
try
432432
{
433-
Response<GetInfoResponse> response = await ServiceClient.DocumentAnalysisGetInfoAsync(cancellationToken).ConfigureAwait(false);
433+
Response<GetInfoResponse> response = await ServiceClient.GetInfoAsync(cancellationToken).ConfigureAwait(false);
434434
return Response.FromValue(response.Value.CustomDocumentModels, response.GetRawResponse());
435435
}
436436
catch (Exception e)
@@ -456,7 +456,7 @@ public virtual Response<ModelOperation> GetOperation(string operationId, Cancell
456456

457457
try
458458
{
459-
var response = ServiceClient.DocumentAnalysisGetOperation(operationId, cancellationToken);
459+
var response = ServiceClient.GetOperation(operationId, cancellationToken);
460460
return Response.FromValue(response.Value, response.GetRawResponse());
461461
}
462462
catch (Exception e)
@@ -482,7 +482,7 @@ public virtual async Task<Response<ModelOperation>> GetOperationAsync(string ope
482482

483483
try
484484
{
485-
var response = await ServiceClient.DocumentAnalysisGetOperationAsync(operationId, cancellationToken).ConfigureAwait(false);
485+
var response = await ServiceClient.GetOperationAsync(operationId, cancellationToken).ConfigureAwait(false);
486486
return Response.FromValue(response.Value, response.GetRawResponse());
487487
}
488488
catch (Exception e)
@@ -506,7 +506,7 @@ Page<ModelOperationInfo> FirstPageFunc(int? pageSizeHint)
506506

507507
try
508508
{
509-
var response = ServiceClient.DocumentAnalysisGetOperations(cancellationToken);
509+
var response = ServiceClient.GetOperations(cancellationToken);
510510
return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
511511
}
512512
catch (Exception e)
@@ -523,7 +523,7 @@ Page<ModelOperationInfo> NextPageFunc(string nextLink, int? pageSizeHint)
523523

524524
try
525525
{
526-
var response = ServiceClient.DocumentAnalysisGetOperationsNextPage(nextLink, cancellationToken);
526+
var response = ServiceClient.GetOperationsNextPage(nextLink, cancellationToken);
527527
return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
528528
}
529529
catch (Exception e)
@@ -550,7 +550,7 @@ async Task<Page<ModelOperationInfo>> FirstPageFunc(int? pageSizeHint)
550550

551551
try
552552
{
553-
var response = await ServiceClient.DocumentAnalysisGetOperationsAsync(cancellationToken).ConfigureAwait(false);
553+
var response = await ServiceClient.GetOperationsAsync(cancellationToken).ConfigureAwait(false);
554554
return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
555555
}
556556
catch (Exception e)
@@ -567,7 +567,7 @@ async Task<Page<ModelOperationInfo>> NextPageFunc(string nextLink, int? pageSize
567567

568568
try
569569
{
570-
var response = await ServiceClient.DocumentAnalysisGetOperationsNextPageAsync(nextLink, cancellationToken).ConfigureAwait(false);
570+
var response = await ServiceClient.GetOperationsNextPageAsync(nextLink, cancellationToken).ConfigureAwait(false);
571571
return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
572572
}
573573
catch (Exception e)
@@ -602,7 +602,7 @@ public virtual CopyModelOperation StartCopyModel(string modelId, CopyAuthorizati
602602

603603
try
604604
{
605-
var response = ServiceClient.DocumentAnalysisCopyDocumentModelTo(modelId, target, cancellationToken);
605+
var response = ServiceClient.CopyDocumentModelTo(modelId, target, cancellationToken);
606606
return new CopyModelOperation(ServiceClient, Diagnostics, response.Headers.OperationLocation, response.GetRawResponse());
607607
}
608608
catch (Exception e)
@@ -631,7 +631,7 @@ public virtual async Task<CopyModelOperation> StartCopyModelAsync(string modelId
631631

632632
try
633633
{
634-
var response = await ServiceClient.DocumentAnalysisCopyDocumentModelToAsync(modelId, target, cancellationToken).ConfigureAwait(false);
634+
var response = await ServiceClient.CopyDocumentModelToAsync(modelId, target, cancellationToken).ConfigureAwait(false);
635635
return new CopyModelOperation(ServiceClient, Diagnostics, response.Headers.OperationLocation, response.GetRawResponse());
636636
}
637637
catch (Exception e)
@@ -663,7 +663,7 @@ public virtual Response<CopyAuthorization> GetCopyAuthorization(string modelId =
663663

664664
try
665665
{
666-
var response = ServiceClient.DocumentAnalysisAuthorizeCopyDocumentModel(request, cancellationToken);
666+
var response = ServiceClient.AuthorizeCopyDocumentModel(request, cancellationToken);
667667
return Response.FromValue(response.Value, response.GetRawResponse());
668668
}
669669
catch (Exception e)
@@ -695,7 +695,7 @@ public virtual async Task<Response<CopyAuthorization>> GetCopyAuthorizationAsync
695695

696696
try
697697
{
698-
var response = await ServiceClient.DocumentAnalysisAuthorizeCopyDocumentModelAsync(request, cancellationToken).ConfigureAwait(false);
698+
var response = await ServiceClient.AuthorizeCopyDocumentModelAsync(request, cancellationToken).ConfigureAwait(false);
699699
return Response.FromValue(response.Value, response.GetRawResponse());
700700
}
701701
catch (Exception e)
@@ -738,7 +738,7 @@ public virtual BuildModelOperation StartCreateComposedModel(IEnumerable<string>
738738
Description = modelDescription
739739
};
740740

741-
var response = ServiceClient.DocumentAnalysisComposeDocumentModel(composeRequest, cancellationToken);
741+
var response = ServiceClient.ComposeDocumentModel(composeRequest, cancellationToken);
742742
return new BuildModelOperation(response.Headers.OperationLocation, response.GetRawResponse(), ServiceClient, Diagnostics);
743743
}
744744
catch (Exception e)
@@ -777,7 +777,7 @@ public virtual async Task<BuildModelOperation> StartCreateComposedModelAsync(IEn
777777
Description = modelDescription
778778
};
779779

780-
var response = await ServiceClient.DocumentAnalysisComposeDocumentModelAsync(composeRequest, cancellationToken).ConfigureAwait(false);
780+
var response = await ServiceClient.ComposeDocumentModelAsync(composeRequest, cancellationToken).ConfigureAwait(false);
781781
return new BuildModelOperation(response.Headers.OperationLocation, response.GetRawResponse(), ServiceClient, Diagnostics);
782782
}
783783
catch (Exception e)
Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)