Skip to content

Commit e7a4b2d

Browse files
authored
[FormRecognizer] 2023-02-28-preview: merging work from private branch (Azure#35191)
1 parent deb6198 commit e7a4b2d

File tree

342 files changed

+85885
-84982
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

342 files changed

+85885
-84982
lines changed

sdk/formrecognizer/Azure.AI.FormRecognizer/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
### Bugs Fixed
1010

1111
### Other Changes
12+
- `DocumentAnalysisClient` and `DocumentModelAdministrationClient` now target service API version `2023-02-28-preview` by default. Version `2022-08-31` can still be targeted if specified in the `DocumentAnalysisClientOptions`.
1213

1314
## 4.0.0 (2022-09-08)
1415

sdk/formrecognizer/Azure.AI.FormRecognizer/api/Azure.AI.FormRecognizer.netstandard2.0.cs

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,18 @@ internal AnalyzeResult() { }
300300
public System.Collections.Generic.IReadOnlyList<Azure.AI.FormRecognizer.DocumentAnalysis.DocumentStyle> Styles { get { throw null; } }
301301
public System.Collections.Generic.IReadOnlyList<Azure.AI.FormRecognizer.DocumentAnalysis.DocumentTable> Tables { get { throw null; } }
302302
}
303+
public partial class AzureBlobContentSource
304+
{
305+
public AzureBlobContentSource(System.Uri containerUri) { }
306+
public System.Uri ContainerUri { get { throw null; } }
307+
public string Prefix { get { throw null; } set { } }
308+
}
309+
public partial class AzureBlobFileListSource
310+
{
311+
public AzureBlobFileListSource(System.Uri containerUri, string fileList) { }
312+
public System.Uri ContainerUri { get { throw null; } }
313+
public string FileList { get { throw null; } }
314+
}
303315
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
304316
public readonly partial struct BoundingRegion : System.IEquatable<Azure.AI.FormRecognizer.DocumentAnalysis.BoundingRegion>
305317
{
@@ -314,6 +326,21 @@ internal AnalyzeResult() { }
314326
public override int GetHashCode() { throw null; }
315327
public override string ToString() { throw null; }
316328
}
329+
public partial class BuildDocumentClassifierOperation : Azure.Operation<Azure.AI.FormRecognizer.DocumentAnalysis.DocumentClassifierDetails>
330+
{
331+
protected BuildDocumentClassifierOperation() { }
332+
public BuildDocumentClassifierOperation(string operationId, Azure.AI.FormRecognizer.DocumentAnalysis.DocumentModelAdministrationClient client) { }
333+
public override bool HasCompleted { get { throw null; } }
334+
public override bool HasValue { get { throw null; } }
335+
public override string Id { get { throw null; } }
336+
public virtual int PercentCompleted { get { throw null; } }
337+
public override Azure.AI.FormRecognizer.DocumentAnalysis.DocumentClassifierDetails Value { get { throw null; } }
338+
public override Azure.Response GetRawResponse() { throw null; }
339+
public override Azure.Response UpdateStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
340+
public override System.Threading.Tasks.ValueTask<Azure.Response> UpdateStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
341+
public override System.Threading.Tasks.ValueTask<Azure.Response<Azure.AI.FormRecognizer.DocumentAnalysis.DocumentClassifierDetails>> WaitForCompletionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
342+
public override System.Threading.Tasks.ValueTask<Azure.Response<Azure.AI.FormRecognizer.DocumentAnalysis.DocumentClassifierDetails>> WaitForCompletionAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
343+
}
317344
public partial class BuildDocumentModelOperation : Azure.Operation<Azure.AI.FormRecognizer.DocumentAnalysis.DocumentModelDetails>
318345
{
319346
protected BuildDocumentModelOperation() { }
@@ -335,6 +362,13 @@ public BuildDocumentModelOptions() { }
335362
public string Description { get { throw null; } set { } }
336363
public System.Collections.Generic.IDictionary<string, string> Tags { get { throw null; } }
337364
}
365+
public partial class ClassifierDocumentTypeDetails
366+
{
367+
public ClassifierDocumentTypeDetails(Azure.AI.FormRecognizer.DocumentAnalysis.AzureBlobContentSource azureBlobSource) { }
368+
public ClassifierDocumentTypeDetails(Azure.AI.FormRecognizer.DocumentAnalysis.AzureBlobFileListSource azureBlobFileListSource) { }
369+
public Azure.AI.FormRecognizer.DocumentAnalysis.AzureBlobFileListSource AzureBlobFileListSource { get { throw null; } }
370+
public Azure.AI.FormRecognizer.DocumentAnalysis.AzureBlobContentSource AzureBlobSource { get { throw null; } }
371+
}
338372
public partial class ComposeDocumentModelOperation : Azure.Operation<Azure.AI.FormRecognizer.DocumentAnalysis.DocumentModelDetails>
339373
{
340374
protected ComposeDocumentModelOperation() { }
@@ -406,12 +440,13 @@ public DocumentAnalysisClient(System.Uri endpoint, Azure.Core.TokenCredential cr
406440
}
407441
public partial class DocumentAnalysisClientOptions : Azure.Core.ClientOptions
408442
{
409-
public DocumentAnalysisClientOptions(Azure.AI.FormRecognizer.DocumentAnalysis.DocumentAnalysisClientOptions.ServiceVersion version = Azure.AI.FormRecognizer.DocumentAnalysis.DocumentAnalysisClientOptions.ServiceVersion.V2022_08_31) { }
443+
public DocumentAnalysisClientOptions(Azure.AI.FormRecognizer.DocumentAnalysis.DocumentAnalysisClientOptions.ServiceVersion version = Azure.AI.FormRecognizer.DocumentAnalysis.DocumentAnalysisClientOptions.ServiceVersion.V2023_02_28_Preview) { }
410444
public Azure.AI.FormRecognizer.DocumentAnalysis.DocumentAnalysisAudience? Audience { get { throw null; } set { } }
411445
public Azure.AI.FormRecognizer.DocumentAnalysis.DocumentAnalysisClientOptions.ServiceVersion Version { get { throw null; } }
412446
public enum ServiceVersion
413447
{
414448
V2022_08_31 = 1,
449+
V2023_02_28_Preview = 2,
415450
}
416451
}
417452
public static partial class DocumentAnalysisModelFactory
@@ -421,6 +456,7 @@ public static partial class DocumentAnalysisModelFactory
421456
public static Azure.AI.FormRecognizer.DocumentAnalysis.AnalyzeResult AnalyzeResult(string modelId = null, string content = null, System.Collections.Generic.IEnumerable<Azure.AI.FormRecognizer.DocumentAnalysis.DocumentPage> pages = null, System.Collections.Generic.IEnumerable<Azure.AI.FormRecognizer.DocumentAnalysis.DocumentTable> tables = null, System.Collections.Generic.IEnumerable<Azure.AI.FormRecognizer.DocumentAnalysis.DocumentKeyValuePair> keyValuePairs = null, System.Collections.Generic.IEnumerable<Azure.AI.FormRecognizer.DocumentAnalysis.DocumentStyle> styles = null, System.Collections.Generic.IEnumerable<Azure.AI.FormRecognizer.DocumentAnalysis.DocumentLanguage> languages = null, System.Collections.Generic.IEnumerable<Azure.AI.FormRecognizer.DocumentAnalysis.AnalyzedDocument> documents = null) { throw null; }
422457
public static Azure.AI.FormRecognizer.DocumentAnalysis.BoundingRegion BoundingRegion(int pageNumber = 0, System.Collections.Generic.IReadOnlyList<System.Drawing.PointF> boundingPolygon = null) { throw null; }
423458
public static Azure.AI.FormRecognizer.DocumentAnalysis.CurrencyValue CurrencyValue(double amount = 0, string symbol = null) { throw null; }
459+
public static Azure.AI.FormRecognizer.DocumentAnalysis.DocumentClassifierDetails DocumentClassifierDetails(string classifierId = null, string description = null, System.DateTimeOffset createdOn = default(System.DateTimeOffset), System.DateTimeOffset? expiresOn = default(System.DateTimeOffset?), string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary<string, Azure.AI.FormRecognizer.DocumentAnalysis.ClassifierDocumentTypeDetails> documentTypes = null) { throw null; }
424460
public static Azure.AI.FormRecognizer.DocumentAnalysis.DocumentField DocumentField(Azure.AI.FormRecognizer.DocumentAnalysis.DocumentFieldType fieldType, Azure.AI.FormRecognizer.DocumentAnalysis.DocumentFieldValue value, string content, System.Collections.Generic.IReadOnlyList<Azure.AI.FormRecognizer.DocumentAnalysis.BoundingRegion> boundingRegions, System.Collections.Generic.IReadOnlyList<Azure.AI.FormRecognizer.DocumentAnalysis.DocumentSpan> spans, float? confidence) { throw null; }
425461
public static Azure.AI.FormRecognizer.DocumentAnalysis.DocumentFieldSchema DocumentFieldSchema(Azure.AI.FormRecognizer.DocumentAnalysis.DocumentFieldType type = Azure.AI.FormRecognizer.DocumentAnalysis.DocumentFieldType.Unknown, string description = null, string example = null, Azure.AI.FormRecognizer.DocumentAnalysis.DocumentFieldSchema items = null, System.Collections.Generic.IReadOnlyDictionary<string, Azure.AI.FormRecognizer.DocumentAnalysis.DocumentFieldSchema> properties = null) { throw null; }
426462
public static Azure.AI.FormRecognizer.DocumentAnalysis.DocumentFieldValue DocumentFieldValueWithAddressFieldType(Azure.AI.FormRecognizer.DocumentAnalysis.AddressValue value) { throw null; }
@@ -477,6 +513,16 @@ public static partial class DocumentAnalysisModelFactory
477513
public static bool operator !=(Azure.AI.FormRecognizer.DocumentAnalysis.DocumentBuildMode left, Azure.AI.FormRecognizer.DocumentAnalysis.DocumentBuildMode right) { throw null; }
478514
public override string ToString() { throw null; }
479515
}
516+
public partial class DocumentClassifierDetails
517+
{
518+
internal DocumentClassifierDetails() { }
519+
public string ApiVersion { get { throw null; } }
520+
public string ClassifierId { get { throw null; } }
521+
public System.DateTimeOffset CreatedOn { get { throw null; } }
522+
public string Description { get { throw null; } }
523+
public System.Collections.Generic.IReadOnlyDictionary<string, Azure.AI.FormRecognizer.DocumentAnalysis.ClassifierDocumentTypeDetails> DocumentTypes { get { throw null; } }
524+
public System.DateTimeOffset? ExpiresOn { get { throw null; } }
525+
}
480526
public partial class DocumentField
481527
{
482528
internal DocumentField() { }
@@ -513,6 +559,7 @@ public enum DocumentFieldType
513559
Signature = 11,
514560
Currency = 12,
515561
Address = 13,
562+
Boolean = 14,
516563
}
517564
public partial class DocumentFieldValue
518565
{
@@ -568,12 +615,16 @@ public DocumentModelAdministrationClient(System.Uri endpoint, Azure.AzureKeyCred
568615
public DocumentModelAdministrationClient(System.Uri endpoint, Azure.AzureKeyCredential credential, Azure.AI.FormRecognizer.DocumentAnalysis.DocumentAnalysisClientOptions options) { }
569616
public DocumentModelAdministrationClient(System.Uri endpoint, Azure.Core.TokenCredential credential) { }
570617
public DocumentModelAdministrationClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.AI.FormRecognizer.DocumentAnalysis.DocumentAnalysisClientOptions options) { }
618+
public virtual Azure.AI.FormRecognizer.DocumentAnalysis.BuildDocumentClassifierOperation BuildDocumentClassifier(Azure.WaitUntil waitUntil, System.Collections.Generic.IDictionary<string, Azure.AI.FormRecognizer.DocumentAnalysis.ClassifierDocumentTypeDetails> documentTypes, string classifierId = null, string description = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
619+
public virtual System.Threading.Tasks.Task<Azure.AI.FormRecognizer.DocumentAnalysis.BuildDocumentClassifierOperation> BuildDocumentClassifierAsync(Azure.WaitUntil waitUntil, System.Collections.Generic.IDictionary<string, Azure.AI.FormRecognizer.DocumentAnalysis.ClassifierDocumentTypeDetails> documentTypes, string classifierId = null, string description = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
571620
public virtual Azure.AI.FormRecognizer.DocumentAnalysis.BuildDocumentModelOperation BuildDocumentModel(Azure.WaitUntil waitUntil, System.Uri blobContainerUri, Azure.AI.FormRecognizer.DocumentAnalysis.DocumentBuildMode buildMode, string modelId = null, string prefix = null, Azure.AI.FormRecognizer.DocumentAnalysis.BuildDocumentModelOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
572621
public virtual System.Threading.Tasks.Task<Azure.AI.FormRecognizer.DocumentAnalysis.BuildDocumentModelOperation> BuildDocumentModelAsync(Azure.WaitUntil waitUntil, System.Uri blobContainerUri, Azure.AI.FormRecognizer.DocumentAnalysis.DocumentBuildMode buildMode, string modelId = null, string prefix = null, Azure.AI.FormRecognizer.DocumentAnalysis.BuildDocumentModelOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
573622
public virtual Azure.AI.FormRecognizer.DocumentAnalysis.ComposeDocumentModelOperation ComposeDocumentModel(Azure.WaitUntil waitUntil, System.Collections.Generic.IEnumerable<string> componentModelIds, string modelId = null, string description = null, System.Collections.Generic.IDictionary<string, string> tags = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
574623
public virtual System.Threading.Tasks.Task<Azure.AI.FormRecognizer.DocumentAnalysis.ComposeDocumentModelOperation> ComposeDocumentModelAsync(Azure.WaitUntil waitUntil, System.Collections.Generic.IEnumerable<string> componentModelIds, string modelId = null, string description = null, System.Collections.Generic.IDictionary<string, string> tags = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
575624
public virtual Azure.AI.FormRecognizer.DocumentAnalysis.CopyDocumentModelToOperation CopyDocumentModelTo(Azure.WaitUntil waitUntil, string modelId, Azure.AI.FormRecognizer.DocumentAnalysis.DocumentModelCopyAuthorization target, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
576625
public virtual System.Threading.Tasks.Task<Azure.AI.FormRecognizer.DocumentAnalysis.CopyDocumentModelToOperation> CopyDocumentModelToAsync(Azure.WaitUntil waitUntil, string modelId, Azure.AI.FormRecognizer.DocumentAnalysis.DocumentModelCopyAuthorization target, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
626+
public virtual Azure.Response DeleteDocumentClassifier(string classifierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
627+
public virtual System.Threading.Tasks.Task<Azure.Response> DeleteDocumentClassifierAsync(string classifierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
577628
public virtual Azure.Response DeleteDocumentModel(string modelId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
578629
public virtual System.Threading.Tasks.Task<Azure.Response> DeleteDocumentModelAsync(string modelId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
579630
public virtual Azure.Response<Azure.AI.FormRecognizer.DocumentAnalysis.DocumentModelCopyAuthorization> GetCopyAuthorization(string modelId = null, string description = null, System.Collections.Generic.IDictionary<string, string> tags = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
namespace Azure.AI.FormRecognizer.DocumentAnalysis
5+
{
6+
public partial class AddressValue
7+
{
8+
/// <summary> Apartment or office number. </summary>
9+
internal string Unit { get; }
10+
11+
/// <summary> Districts or boroughs within a city, such as Brooklyn in New York City or City of Westminster in London. </summary>
12+
internal string CityDistrict { get; }
13+
14+
/// <summary> Second-level administrative division used in certain locales. </summary>
15+
internal string StateDistrict { get; }
16+
17+
/// <summary> Unofficial neighborhood name, like Chinatown. </summary>
18+
internal string Suburb { get; }
19+
20+
/// <summary> Build name, such as World Trade Center. </summary>
21+
internal string House { get; }
22+
23+
/// <summary> Floor number, such as 3F. </summary>
24+
internal string Level { get; }
25+
}
26+
}

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

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

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

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ namespace Azure.AI.FormRecognizer.DocumentAnalysis
88
/// <summary>
99
/// Represents one or more documents that have been analyzed by a trained or prebuilt model.
1010
/// </summary>
11-
[CodeGenModel("AnalyzeResult")]
1211
public partial class AnalyzeResult
1312
{
14-
private ApiVersion ApiVersion { get; }
13+
private string ApiVersion { get; }
14+
1515
private StringIndexType StringIndexType { get; }
1616
}
1717
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
using System;
5+
using Azure.Core;
6+
7+
namespace Azure.AI.FormRecognizer.DocumentAnalysis
8+
{
9+
public partial class AzureBlobContentSource
10+
{
11+
/// <summary>
12+
/// The Azure Blob Storage container URI.
13+
/// </summary>
14+
[CodeGenMember("ContainerUrl")]
15+
public Uri ContainerUri { get; }
16+
}
17+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
using System;
5+
using Azure.Core;
6+
7+
namespace Azure.AI.FormRecognizer.DocumentAnalysis
8+
{
9+
public partial class AzureBlobFileListSource
10+
{
11+
/// <summary>
12+
/// The Azure Blob Storage container URI.
13+
/// </summary>
14+
[CodeGenMember("ContainerUrl")]
15+
public Uri ContainerUri { get; }
16+
17+
/// <summary>
18+
/// The Path to the JSONL file within the container specifying a subset of documents for training.
19+
/// </summary>
20+
public string FileList { get; }
21+
}
22+
}

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
namespace Azure.AI.FormRecognizer.DocumentAnalysis
1212
{
13-
[CodeGenModel("BoundingRegion")]
1413
[CodeGenSuppress(nameof(BoundingRegion), typeof(int), typeof(IEnumerable<float>))]
1514
[CodeGenSuppress("Polygon")]
1615
public readonly partial struct BoundingRegion : IEquatable<BoundingRegion>

0 commit comments

Comments
 (0)