Skip to content

Commit 239708d

Browse files
authored
Update Autorest C# (Azure#11013)
1 parent ec9a6b2 commit 239708d

29 files changed

+390
-390
lines changed

eng/CodeGeneration.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<_AutoRestVersion>https://github.com/Azure/autorest/releases/download/autorest-3.0.6207/autorest-3.0.6207.tgz</_AutoRestVersion>
55
<_AutoRestCoreVersion>3.0.6257</_AutoRestCoreVersion>
6-
<_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>
6+
<_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</_AutoRestCSharpVersion>
77
<_SupportsCodeGeneration Condition="'$(IsClientLibrary)' == 'true'">true</_SupportsCodeGeneration>
88
<_DefaultInputName Condition="Exists('$(MSBuildProjectDirectory)/autorest.md')">$(MSBuildProjectDirectory)/autorest.md</_DefaultInputName>
99
<AutorestInput Condition="'$(AutorestInput)' == ''">$(_DefaultInputName)</AutorestInput>

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public virtual Operation<CustomModel> StartTraining(string source, TrainingFileF
7777
trainRequest.SourceFilter = filter;
7878
}
7979

80-
ResponseWithHeaders<TrainCustomModelAsyncHeaders> response = _operations.RestClient.TrainCustomModelAsync(trainRequest);
80+
ResponseWithHeaders<ServiceTrainCustomModelAsyncHeaders> response = _operations.RestClient.TrainCustomModelAsync(trainRequest);
8181
return new TrainingOperation(_operations, response.Headers.Location);
8282
}
8383

@@ -100,7 +100,7 @@ public virtual async Task<Operation<CustomModel>> StartTrainingAsync(string sour
100100
trainRequest.SourceFilter = filter;
101101
}
102102

103-
ResponseWithHeaders<TrainCustomModelAsyncHeaders> response = await _operations.RestClient.TrainCustomModelAsyncAsync(trainRequest).ConfigureAwait(false);
103+
ResponseWithHeaders<ServiceTrainCustomModelAsyncHeaders> response = await _operations.RestClient.TrainCustomModelAsyncAsync(trainRequest).ConfigureAwait(false);
104104
return new TrainingOperation(_operations, response.Headers.Location);
105105
}
106106

@@ -122,7 +122,7 @@ public virtual Operation<CustomLabeledModel> StartTrainingWithLabels(string sour
122122
trainRequest.SourceFilter = filter;
123123
}
124124

125-
ResponseWithHeaders<TrainCustomModelAsyncHeaders> response = _operations.RestClient.TrainCustomModelAsync(trainRequest);
125+
ResponseWithHeaders<ServiceTrainCustomModelAsyncHeaders> response = _operations.RestClient.TrainCustomModelAsync(trainRequest);
126126
return new TrainingWithLabelsOperation(_operations, response.Headers.Location);
127127
}
128128

@@ -144,7 +144,7 @@ public virtual async Task<Operation<CustomLabeledModel>> StartTrainingWithLabels
144144
trainRequest.SourceFilter = filter;
145145
}
146146

147-
ResponseWithHeaders<TrainCustomModelAsyncHeaders> response = await _operations.RestClient.TrainCustomModelAsyncAsync(trainRequest).ConfigureAwait(false);
147+
ResponseWithHeaders<ServiceTrainCustomModelAsyncHeaders> response = await _operations.RestClient.TrainCustomModelAsyncAsync(trainRequest).ConfigureAwait(false);
148148
return new TrainingWithLabelsOperation(_operations, response.Headers.Location);
149149
}
150150

@@ -168,7 +168,7 @@ public virtual Operation<IReadOnlyList<ExtractedPage>> StartExtractFormPages(str
168168
{
169169
// TODO: automate content-type detection
170170
// https://github.com/Azure/azure-sdk-for-net/issues/10329
171-
ResponseWithHeaders<AnalyzeWithCustomModelHeaders> response = _operations.RestClient.AnalyzeWithCustomModel(new Guid(modelId), includeTextDetails: includeRawPageExtractions, contentType, stream, cancellationToken);
171+
ResponseWithHeaders<ServiceAnalyzeWithCustomModelHeaders> response = _operations.RestClient.AnalyzeWithCustomModel(new Guid(modelId), contentType, stream, includeTextDetails: includeRawPageExtractions, cancellationToken);
172172
return new ExtractPagesOperation(_operations, modelId, response.Headers.OperationLocation);
173173
}
174174

@@ -184,7 +184,7 @@ public virtual Operation<IReadOnlyList<ExtractedPage>> StartExtractFormPages(str
184184
public virtual Operation<IReadOnlyList<ExtractedPage>> StartExtractFormPages(string modelId, Uri uri, bool includeRawPageExtractions = false, CancellationToken cancellationToken = default)
185185
{
186186
SourcePath_internal sourcePath = new SourcePath_internal() { Source = uri.ToString() };
187-
ResponseWithHeaders<AnalyzeWithCustomModelHeaders> response = _operations.RestClient.AnalyzeWithCustomModel(new Guid(modelId), includeTextDetails: includeRawPageExtractions, sourcePath, cancellationToken);
187+
ResponseWithHeaders<ServiceAnalyzeWithCustomModelHeaders> response = _operations.RestClient.AnalyzeWithCustomModel(new Guid(modelId), includeTextDetails: includeRawPageExtractions, sourcePath, cancellationToken);
188188
return new ExtractPagesOperation(_operations, modelId, response.Headers.OperationLocation);
189189
}
190190

@@ -202,7 +202,7 @@ public virtual async Task<Operation<IReadOnlyList<ExtractedPage>>> StartExtractF
202202
{
203203
// TODO: automate content-type detection
204204
// https://github.com/Azure/azure-sdk-for-net/issues/10329
205-
ResponseWithHeaders<AnalyzeWithCustomModelHeaders> response = await _operations.RestClient.AnalyzeWithCustomModelAsync(new Guid(modelId), includeTextDetails: includeRawPageExtractions, contentType, stream, cancellationToken).ConfigureAwait(false);
205+
ResponseWithHeaders<ServiceAnalyzeWithCustomModelHeaders> response = await _operations.RestClient.AnalyzeWithCustomModelAsync(new Guid(modelId), contentType, stream, includeTextDetails: includeRawPageExtractions, cancellationToken).ConfigureAwait(false);
206206
return new ExtractPagesOperation(_operations, modelId, response.Headers.OperationLocation);
207207
}
208208

@@ -219,7 +219,7 @@ public virtual async Task<Operation<IReadOnlyList<ExtractedPage>>> StartExtractF
219219
public virtual async Task<Operation<IReadOnlyList<ExtractedPage>>> StartExtractFormPagesAsync(string modelId, Uri uri, bool includeRawPageExtractions = false, CancellationToken cancellationToken = default)
220220
{
221221
SourcePath_internal sourcePath = new SourcePath_internal() { Source = uri.ToString() };
222-
ResponseWithHeaders<AnalyzeWithCustomModelHeaders> response = await _operations.RestClient.AnalyzeWithCustomModelAsync(new Guid(modelId), includeTextDetails: includeRawPageExtractions, sourcePath, cancellationToken).ConfigureAwait(false);
222+
ResponseWithHeaders<ServiceAnalyzeWithCustomModelHeaders> response = await _operations.RestClient.AnalyzeWithCustomModelAsync(new Guid(modelId), includeTextDetails: includeRawPageExtractions, sourcePath, cancellationToken).ConfigureAwait(false);
223223
return new ExtractPagesOperation(_operations, modelId, response.Headers.OperationLocation);
224224
}
225225
#endregion
@@ -240,7 +240,7 @@ public virtual Operation<IReadOnlyList<ExtractedLabeledForm>> StartExtractLabele
240240
{
241241
// TODO: automate content-type detection
242242
// https://github.com/Azure/azure-sdk-for-net/issues/10329
243-
ResponseWithHeaders<AnalyzeWithCustomModelHeaders> response = _operations.RestClient.AnalyzeWithCustomModel(new Guid(modelId), includeTextDetails: includeRawPageExtractions, contentType, stream, cancellationToken);
243+
ResponseWithHeaders<ServiceAnalyzeWithCustomModelHeaders> response = _operations.RestClient.AnalyzeWithCustomModel(new Guid(modelId), contentType, stream, includeTextDetails: includeRawPageExtractions, cancellationToken);
244244
return new ExtractLabeledFormOperation(_operations, modelId, response.Headers.OperationLocation);
245245
}
246246

@@ -256,7 +256,7 @@ public virtual Operation<IReadOnlyList<ExtractedLabeledForm>> StartExtractLabele
256256
public virtual Operation<IReadOnlyList<ExtractedLabeledForm>> StartExtractLabeledForms(string modelId, Uri uri, bool includeRawPageExtractions = false, CancellationToken cancellationToken = default)
257257
{
258258
SourcePath_internal sourcePath = new SourcePath_internal() { Source = uri.ToString() };
259-
ResponseWithHeaders<AnalyzeWithCustomModelHeaders> response = _operations.RestClient.AnalyzeWithCustomModel(new Guid(modelId), includeTextDetails: includeRawPageExtractions, sourcePath, cancellationToken);
259+
ResponseWithHeaders<ServiceAnalyzeWithCustomModelHeaders> response = _operations.RestClient.AnalyzeWithCustomModel(new Guid(modelId), includeTextDetails: includeRawPageExtractions, sourcePath, cancellationToken);
260260
return new ExtractLabeledFormOperation(_operations, modelId, response.Headers.OperationLocation);
261261
}
262262

@@ -274,7 +274,7 @@ public virtual async Task<Operation<IReadOnlyList<ExtractedLabeledForm>>> StartE
274274
{
275275
// TODO: automate content-type detection
276276
// https://github.com/Azure/azure-sdk-for-net/issues/10329
277-
ResponseWithHeaders<AnalyzeWithCustomModelHeaders> response = await _operations.RestClient.AnalyzeWithCustomModelAsync(new Guid(modelId), includeTextDetails: includeRawPageExtractions, contentType, stream, cancellationToken).ConfigureAwait(false);
277+
ResponseWithHeaders<ServiceAnalyzeWithCustomModelHeaders> response = await _operations.RestClient.AnalyzeWithCustomModelAsync(new Guid(modelId), contentType, stream, includeTextDetails: includeRawPageExtractions, cancellationToken).ConfigureAwait(false);
278278
return new ExtractLabeledFormOperation(_operations, modelId, response.Headers.OperationLocation);
279279
}
280280

@@ -290,7 +290,7 @@ public virtual async Task<Operation<IReadOnlyList<ExtractedLabeledForm>>> StartE
290290
public virtual async Task<Operation<IReadOnlyList<ExtractedLabeledForm>>> StartExtractLabeledFormsAsync(string modelId, Uri uri, bool includeRawPageExtractions = false, CancellationToken cancellationToken = default)
291291
{
292292
SourcePath_internal sourcePath = new SourcePath_internal() { Source = uri.ToString() };
293-
ResponseWithHeaders<AnalyzeWithCustomModelHeaders> response = await _operations.RestClient.AnalyzeWithCustomModelAsync(new Guid(modelId), includeTextDetails: includeRawPageExtractions, sourcePath, cancellationToken).ConfigureAwait(false);
293+
ResponseWithHeaders<ServiceAnalyzeWithCustomModelHeaders> response = await _operations.RestClient.AnalyzeWithCustomModelAsync(new Guid(modelId), includeTextDetails: includeRawPageExtractions, sourcePath, cancellationToken).ConfigureAwait(false);
294294
return new ExtractLabeledFormOperation(_operations, modelId, response.Headers.OperationLocation);
295295
}
296296
#endregion

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public virtual Operation<IReadOnlyList<ExtractedLayoutPage>> StartExtractLayouts
6464
{
6565
// TODO: automate content-type detection
6666
// https://github.com/Azure/azure-sdk-for-net/issues/10329
67-
ResponseWithHeaders<AnalyzeLayoutAsyncHeaders> response = _operations.RestClient.AnalyzeLayoutAsync(contentType, stream, cancellationToken);
67+
ResponseWithHeaders<ServiceAnalyzeLayoutAsyncHeaders> response = _operations.RestClient.AnalyzeLayoutAsync(contentType, stream, cancellationToken);
6868
return new ExtractLayoutOperation(_operations, response.Headers.OperationLocation);
6969
}
7070

@@ -81,7 +81,7 @@ public virtual async Task<Operation<IReadOnlyList<ExtractedLayoutPage>>> StartEx
8181
{
8282
// TODO: automate content-type detection
8383
// https://github.com/Azure/azure-sdk-for-net/issues/10329
84-
ResponseWithHeaders<AnalyzeLayoutAsyncHeaders> response = await _operations.RestClient.AnalyzeLayoutAsyncAsync(contentType, stream, cancellationToken).ConfigureAwait(false);
84+
ResponseWithHeaders<ServiceAnalyzeLayoutAsyncHeaders> response = await _operations.RestClient.AnalyzeLayoutAsyncAsync(contentType, stream, cancellationToken).ConfigureAwait(false);
8585
return new ExtractLayoutOperation(_operations, response.Headers.OperationLocation);
8686
}
8787

@@ -96,7 +96,7 @@ public virtual async Task<Operation<IReadOnlyList<ExtractedLayoutPage>>> StartEx
9696
public virtual Operation<IReadOnlyList<ExtractedLayoutPage>> StartExtractLayouts(Uri uri, CancellationToken cancellationToken = default)
9797
{
9898
SourcePath_internal sourcePath = new SourcePath_internal() { Source = uri.ToString() };
99-
ResponseWithHeaders<AnalyzeLayoutAsyncHeaders> response = _operations.RestClient.AnalyzeLayoutAsync(sourcePath, cancellationToken);
99+
ResponseWithHeaders<ServiceAnalyzeLayoutAsyncHeaders> response = _operations.RestClient.AnalyzeLayoutAsync(sourcePath, cancellationToken);
100100
return new ExtractLayoutOperation(_operations, response.Headers.OperationLocation);
101101
}
102102

@@ -111,7 +111,7 @@ public virtual Operation<IReadOnlyList<ExtractedLayoutPage>> StartExtractLayouts
111111
public virtual async Task<Operation<IReadOnlyList<ExtractedLayoutPage>>> StartExtractLayoutsAsync(Uri uri, CancellationToken cancellationToken = default)
112112
{
113113
SourcePath_internal sourcePath = new SourcePath_internal() { Source = uri.ToString() };
114-
ResponseWithHeaders<AnalyzeLayoutAsyncHeaders> response = await _operations.RestClient.AnalyzeLayoutAsyncAsync(sourcePath, cancellationToken).ConfigureAwait(false);
114+
ResponseWithHeaders<ServiceAnalyzeLayoutAsyncHeaders> response = await _operations.RestClient.AnalyzeLayoutAsyncAsync(sourcePath, cancellationToken).ConfigureAwait(false);
115115
return new ExtractLayoutOperation(_operations, response.Headers.OperationLocation);
116116
}
117117
}
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)