Skip to content

Commit

Permalink
targeting 2.1 (#15079)
Browse files Browse the repository at this point in the history
  • Loading branch information
maririos authored Sep 11, 2020
1 parent b540be5 commit 8e42825
Show file tree
Hide file tree
Showing 169 changed files with 60,464 additions and 45,901 deletions.
3 changes: 2 additions & 1 deletion sdk/formrecognizer/Azure.AI.FormRecognizer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Release History

## 3.1.0-beta.1 (Unreleased)

- It defaults to the latest supported API version, which currently is `2.1-preview.1`.
Note that new functionality hasn't been implemented in the client library.

## 3.0.0 (2020-08-20)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ public enum FieldValueType
Int64 = 5,
List = 6,
Dictionary = 7,
SelectionMark = 8,
}
public abstract partial class FormElement
{
Expand Down
12 changes: 12 additions & 0 deletions sdk/formrecognizer/Azure.AI.FormRecognizer/src/Attributes.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using Azure.Core;

namespace Azure.AI.FormRecognizer.Training
{
[CodeGenModel("Attributes")]
internal partial class Attributes
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,10 @@ internal CustomFormModelInfo(string modelId, DateTimeOffset trainingStartedOn, D
/// </summary>
[CodeGenMember("LastUpdatedDateTime")]
public DateTimeOffset TrainingCompletedOn { get; }

/// <summary> Optional user defined model name (max length: 1024). </summary>
private string ModelName { get; }
/// <summary> Optional model attributes. </summary>
private Attributes Attributes { get; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using Azure.Core;

namespace Azure.AI.FormRecognizer.Models
{
[CodeGenModel("FieldValueSelectionMark")]
internal readonly partial struct FieldValueSelectionMark
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ public enum FieldValueType
/// Used for <see cref="Dictionary{TKey, TValue}"/> type.
/// </summary>
[CodeGenMember("Object")]
Dictionary
Dictionary,

/// <summary>
/// Used for <see cref="FieldValueSelectionMark"/> type.
/// </summary>
SelectionMark
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public virtual async Task<RecognizeReceiptsOperation> StartRecognizeReceiptsAsyn
{
FormContentType contentType = recognizeReceiptsOptions.ContentType ?? DetectContentType(receipt, nameof(receipt));

Response response = await ServiceClient.AnalyzeReceiptAsyncAsync(contentType, receipt, includeTextDetails: recognizeReceiptsOptions.IncludeFieldElements, cancellationToken).ConfigureAwait(false);
Response response = await ServiceClient.AnalyzeReceiptAsyncAsync(contentType, receipt, includeTextDetails: recognizeReceiptsOptions.IncludeFieldElements, default, cancellationToken).ConfigureAwait(false);
string location = ClientCommon.GetResponseHeader(response.Headers, Constants.OperationLocationHeader);

return new RecognizeReceiptsOperation(ServiceClient, Diagnostics, location);
Expand Down Expand Up @@ -304,7 +304,7 @@ public virtual RecognizeReceiptsOperation StartRecognizeReceipts(Stream receipt,
{
FormContentType contentType = recognizeReceiptsOptions.ContentType ?? DetectContentType(receipt, nameof(receipt));

Response response = ServiceClient.AnalyzeReceiptAsync(contentType, receipt, includeTextDetails: recognizeReceiptsOptions.IncludeFieldElements, cancellationToken);
Response response = ServiceClient.AnalyzeReceiptAsync(contentType, receipt, includeTextDetails: recognizeReceiptsOptions.IncludeFieldElements, default, cancellationToken);
string location = ClientCommon.GetResponseHeader(response.Headers, Constants.OperationLocationHeader);

return new RecognizeReceiptsOperation(ServiceClient, Diagnostics, location);
Expand Down Expand Up @@ -336,7 +336,7 @@ public virtual async Task<RecognizeReceiptsOperation> StartRecognizeReceiptsFrom
try
{
SourcePath sourcePath = new SourcePath() { Source = receiptUri.AbsoluteUri };
Response response = await ServiceClient.AnalyzeReceiptAsyncAsync(includeTextDetails: recognizeReceiptsOptions.IncludeFieldElements, sourcePath, cancellationToken).ConfigureAwait(false);
Response response = await ServiceClient.AnalyzeReceiptAsyncAsync(includeTextDetails: recognizeReceiptsOptions.IncludeFieldElements, locale:default, fileStream: sourcePath, cancellationToken).ConfigureAwait(false);
string location = ClientCommon.GetResponseHeader(response.Headers, Constants.OperationLocationHeader);

return new RecognizeReceiptsOperation(ServiceClient, Diagnostics, location);
Expand Down Expand Up @@ -368,7 +368,7 @@ public virtual RecognizeReceiptsOperation StartRecognizeReceiptsFromUri(Uri rece
try
{
SourcePath sourcePath = new SourcePath() { Source = receiptUri.AbsoluteUri };
Response response = ServiceClient.AnalyzeReceiptAsync(includeTextDetails: recognizeReceiptsOptions.IncludeFieldElements, sourcePath, cancellationToken);
Response response = ServiceClient.AnalyzeReceiptAsync(includeTextDetails: recognizeReceiptsOptions.IncludeFieldElements, locale: default, fileStream:sourcePath, cancellationToken);
string location = ClientCommon.GetResponseHeader(response.Headers, Constants.OperationLocationHeader);

return new RecognizeReceiptsOperation(ServiceClient, Diagnostics, location);
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.

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.

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

0 comments on commit 8e42825

Please sign in to comment.