Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Autorest version to 20211207.1 #25789

Merged
merged 6 commits into from
Dec 9, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/Packages.Data.props
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
All should have PrivateAssets="All" set so they don't become package dependencies
-->
<ItemGroup>
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20211203.1" PrivateAssets="All" />
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20211207.1" PrivateAssets="All" />
<PackageReference Update="Azure.ClientSdk.Analyzers" Version="0.1.1-dev.20210903.4" PrivateAssets="All" />
<PackageReference Update="coverlet.collector" Version="1.3.0" PrivateAssets="All" />
<PackageReference Update="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.1" PrivateAssets="All" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ public override async ValueTask<Response> UpdateStatusAsync(CancellationToken ca
async ValueTask<OperationState<AnalyzeResult>> IOperation<AnalyzeResult>.UpdateStateAsync(bool async, CancellationToken cancellationToken)
{
Response<AnalyzeResultOperation> response = async
? await _serviceClient.DocumentAnalysisGetAnalyzeDocumentResultAsync(_modelId, _resultId, cancellationToken).ConfigureAwait(false)
: _serviceClient.DocumentAnalysisGetAnalyzeDocumentResult(_modelId, _resultId, cancellationToken);
? await _serviceClient.GetAnalyzeDocumentResultAsync(_modelId, _resultId, cancellationToken).ConfigureAwait(false)
: _serviceClient.GetAnalyzeDocumentResult(_modelId, _resultId, cancellationToken);

AnalyzeResultOperationStatus status = response.Value.Status;
Response rawResponse = response.GetRawResponse();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ public override async ValueTask<Response> UpdateStatusAsync(CancellationToken ca
async ValueTask<OperationState<DocumentModel>> IOperation<DocumentModel>.UpdateStateAsync(bool async, CancellationToken cancellationToken)
{
Response<ModelOperation> response = async
? await _serviceClient.DocumentAnalysisGetOperationAsync(Id, cancellationToken).ConfigureAwait(false)
: _serviceClient.DocumentAnalysisGetOperation(Id, cancellationToken);
? await _serviceClient.GetOperationAsync(Id, cancellationToken).ConfigureAwait(false)
: _serviceClient.GetOperation(Id, cancellationToken);

DocumentOperationStatus status = response.Value.Status;
Response rawResponse = response.GetRawResponse();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ public override async ValueTask<Response> UpdateStatusAsync(CancellationToken ca
async ValueTask<OperationState<DocumentModel>> IOperation<DocumentModel>.UpdateStateAsync(bool async, CancellationToken cancellationToken)
{
Response<ModelOperation> response = async
? await _serviceClient.DocumentAnalysisGetOperationAsync(Id, cancellationToken).ConfigureAwait(false)
: _serviceClient.DocumentAnalysisGetOperation(Id, cancellationToken);
? await _serviceClient.GetOperationAsync(Id, cancellationToken).ConfigureAwait(false)
: _serviceClient.GetOperation(Id, cancellationToken);

DocumentOperationStatus status = response.Value.Status;
Response rawResponse = response.GetRawResponse();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public virtual async Task<AnalyzeDocumentOperation> StartAnalyzeDocumentAsync(st

try
{
var response = await ServiceClient.DocumentAnalysisAnalyzeDocumentAsync(
var response = await ServiceClient.AnalyzeDocumentAsync(
modelId,
ContentType1.ApplicationOctetStream,
analyzeDocumentOptions.Pages.Count == 0 ? null : string.Join(",", analyzeDocumentOptions.Pages),
Expand Down Expand Up @@ -191,7 +191,7 @@ public virtual AnalyzeDocumentOperation StartAnalyzeDocument(string modelId, Str

try
{
var response = ServiceClient.DocumentAnalysisAnalyzeDocument(
var response = ServiceClient.AnalyzeDocument(
modelId,
ContentType1.ApplicationOctetStream,
analyzeDocumentOptions.Pages.Count == 0 ? null : string.Join(",", analyzeDocumentOptions.Pages),
Expand Down Expand Up @@ -242,7 +242,7 @@ public virtual async Task<AnalyzeDocumentOperation> StartAnalyzeDocumentFromUriA
try
{
var request = new AnalyzeDocumentRequest() { UrlSource = documentUri.AbsoluteUri };
var response = await ServiceClient.DocumentAnalysisAnalyzeDocumentAsync(
var response = await ServiceClient.AnalyzeDocumentAsync(
modelId,
analyzeDocumentOptions.Pages.Count == 0 ? null : string.Join(",", analyzeDocumentOptions.Pages),
analyzeDocumentOptions.Locale,
Expand Down Expand Up @@ -292,7 +292,7 @@ public virtual AnalyzeDocumentOperation StartAnalyzeDocumentFromUri(string model
try
{
var request = new AnalyzeDocumentRequest() { UrlSource = documentUri.AbsoluteUri };
var response = ServiceClient.DocumentAnalysisAnalyzeDocument(
var response = ServiceClient.AnalyzeDocument(
modelId,
analyzeDocumentOptions.Pages.Count == 0 ? null : string.Join(",", analyzeDocumentOptions.Pages),
analyzeDocumentOptions.Locale,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public virtual BuildModelOperation StartBuildModel(Uri trainingFilesUri, string
Description = buildModelOptions.ModelDescription
};

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

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

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

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

try
{
return ServiceClient.DocumentAnalysisDeleteModel(modelId, cancellationToken);
return ServiceClient.DeleteModel(modelId, cancellationToken);
}
catch (Exception e)
{
Expand All @@ -297,7 +297,7 @@ public virtual async Task<Response> DeleteModelAsync(string modelId, Cancellatio

try
{
return await ServiceClient.DocumentAnalysisDeleteModelAsync(modelId, cancellationToken).ConfigureAwait(false);
return await ServiceClient.DeleteModelAsync(modelId, cancellationToken).ConfigureAwait(false);
}
catch (Exception e)
{
Expand All @@ -320,7 +320,7 @@ Page<DocumentModelInfo> FirstPageFunc(int? pageSizeHint)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

try
{
var response = ServiceClient.DocumentAnalysisAuthorizeCopyDocumentModel(request, cancellationToken);
var response = ServiceClient.AuthorizeCopyDocumentModel(request, cancellationToken);
return Response.FromValue(response.Value, response.GetRawResponse());
}
catch (Exception e)
Expand Down Expand Up @@ -695,7 +695,7 @@ public virtual async Task<Response<CopyAuthorization>> GetCopyAuthorizationAsync

try
{
var response = await ServiceClient.DocumentAnalysisAuthorizeCopyDocumentModelAsync(request, cancellationToken).ConfigureAwait(false);
var response = await ServiceClient.AuthorizeCopyDocumentModelAsync(request, cancellationToken).ConfigureAwait(false);
return Response.FromValue(response.Value, response.GetRawResponse());
}
catch (Exception e)
Expand Down Expand Up @@ -738,7 +738,7 @@ public virtual BuildModelOperation StartCreateComposedModel(IEnumerable<string>
Description = modelDescription
};

var response = ServiceClient.DocumentAnalysisComposeDocumentModel(composeRequest, cancellationToken);
var response = ServiceClient.ComposeDocumentModel(composeRequest, cancellationToken);
return new BuildModelOperation(response.Headers.OperationLocation, response.GetRawResponse(), ServiceClient, Diagnostics);
}
catch (Exception e)
Expand Down Expand Up @@ -777,7 +777,7 @@ public virtual async Task<BuildModelOperation> StartCreateComposedModelAsync(IEn
Description = modelDescription
};

var response = await ServiceClient.DocumentAnalysisComposeDocumentModelAsync(composeRequest, cancellationToken).ConfigureAwait(false);
var response = await ServiceClient.ComposeDocumentModelAsync(composeRequest, cancellationToken).ConfigureAwait(false);
return new BuildModelOperation(response.Headers.OperationLocation, response.GetRawResponse(), ServiceClient, Diagnostics);
}
catch (Exception e)
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading