From 3d5df91b5ced8c730eb3f1866a21e11d024ccd9d Mon Sep 17 00:00:00 2001 From: Caio Saldanha Date: Mon, 6 Nov 2023 15:23:04 -0800 Subject: [PATCH 1/5] [DocumentIntelligence] Initial generated project (#1987) --- .github/CODEOWNERS | 1 + .../Azure.AI.DocumentIntelligence.sln | 36 + .../CHANGELOG.md | 11 + .../Directory.Build.props | 6 + .../Azure.AI.DocumentIntelligence/README.md | 86 + .../src/AnalyzeResult.Serialization.cs | 19 + .../src/Azure.AI.DocumentIntelligence.csproj | 21 + ...mentIntelligenceClientBuilderExtensions.cs | 55 + .../AIDocumentIntelligenceModelFactory.cs | 316 +++ .../src/Generated/AddressValue.cs | 86 + .../AnalyzeDocumentRequest.Serialization.cs | 39 + .../src/Generated/AnalyzeDocumentRequest.cs | 53 + .../src/Generated/AnalyzeResult.cs | 123 + .../src/Generated/AnalyzedDocument.cs | 61 + .../AuthorizeCopyRequest.Serialization.cs | 47 + .../src/Generated/AuthorizeCopyRequest.cs | 46 + ...zureAIDocumentIntelligenceClientOptions.cs | 43 + .../AzureBlobContentSource.Serialization.cs | 70 + .../src/Generated/AzureBlobContentSource.cs | 40 + ...BlobFileListContentSource.Serialization.cs | 67 + .../AzureBlobFileListContentSource.cs | 34 + .../src/Generated/BoundingRegion.cs | 59 + ...DocumentClassifierRequest.Serialization.cs | 44 + .../BuildDocumentClassifierRequest.cs | 48 + ...BuildDocumentModelRequest.Serialization.cs | 59 + .../Generated/BuildDocumentModelRequest.cs | 72 + ...ndexBuildOperationDetails.Serialization.cs | 125 + .../ChatIndexBuildOperationDetails.cs | 50 + .../ChatIndexDetails.Serialization.cs | 61 + .../src/Generated/ChatIndexDetails.cs | 28 + .../src/Generated/ChatIndexSummary.cs | 42 + ...sifierDocumentTypeDetails.Serialization.cs | 95 + .../ClassifierDocumentTypeDetails.cs | 52 + .../ClassifyDocumentRequest.Serialization.cs | 39 + .../src/Generated/ClassifyDocumentRequest.cs | 53 + ...onentDocumentModelDetails.Serialization.cs | 31 + .../ComponentDocumentModelDetails.cs | 29 + ...mposeDocumentModelRequest.Serialization.cs | 54 + .../Generated/ComposeDocumentModelRequest.cs | 54 + .../src/Generated/ContentFormat.cs | 54 + .../src/Generated/ContentSourceKind.cs | 57 + .../CopyAuthorization.Serialization.cs | 99 + .../src/Generated/CopyAuthorization.cs | 62 + .../src/Generated/CurrencyValue.cs | 38 + ...stomDocumentModelsDetails.Serialization.cs | 47 + .../Generated/CustomDocumentModelsDetails.cs | 27 + .../Generated/Docs/DocumentAnalysisClient.xml | 1063 +++++++++ .../DocumentModelAdministrationClient.xml | 1915 +++++++++++++++ .../src/Generated/DocumentAnalysisClient.cs | 437 ++++ .../src/Generated/DocumentAnalysisFeature.cs | 66 + .../src/Generated/DocumentBarcode.cs | 72 + .../src/Generated/DocumentBuildMode.cs | 51 + .../src/Generated/DocumentCaption.cs | 55 + ...fierBuildOperationDetails.Serialization.cs | 125 + ...DocumentClassifierBuildOperationDetails.cs | 50 + ...DocumentClassifierDetails.Serialization.cs | 83 + .../Generated/DocumentClassifierDetails.cs | 65 + .../src/Generated/DocumentField.cs | 110 + .../DocumentFieldSchema.Serialization.cs | 80 + .../src/Generated/DocumentFieldSchema.cs | 50 + .../src/Generated/DocumentFieldType.cs | 87 + .../src/Generated/DocumentFigure.cs | 57 + .../src/Generated/DocumentFootnote.cs | 55 + .../src/Generated/DocumentFormula.cs | 72 + ...DocumentIntelligenceError.Serialization.cs | 80 + .../Generated/DocumentIntelligenceError.cs | 57 + .../src/Generated/DocumentKeyValueElement.cs | 50 + .../src/Generated/DocumentKeyValuePair.cs | 49 + .../src/Generated/DocumentLanguage.cs | 69 + .../src/Generated/DocumentLine.cs | 63 + .../src/Generated/DocumentList.cs | 45 + .../src/Generated/DocumentListItem.cs | 61 + .../DocumentModelAdministrationClient.cs | 1698 ++++++++++++++ ...odelBuildOperationDetails.Serialization.cs | 125 + .../DocumentModelBuildOperationDetails.cs | 50 + ...elComposeOperationDetails.Serialization.cs | 125 + .../DocumentModelComposeOperationDetails.cs | 50 + ...delCopyToOperationDetails.Serialization.cs | 125 + .../DocumentModelCopyToOperationDetails.cs | 50 + .../DocumentModelDetails.Serialization.cs | 128 + .../src/Generated/DocumentModelDetails.cs | 69 + .../DocumentModelSummary.Serialization.cs | 87 + .../src/Generated/DocumentModelSummary.cs | 58 + .../src/Generated/DocumentPage.cs | 103 + .../src/Generated/DocumentParagraph.cs | 57 + .../src/Generated/DocumentSection.cs | 43 + .../src/Generated/DocumentSelectionMark.cs | 68 + .../src/Generated/DocumentSpan.cs | 30 + .../src/Generated/DocumentStyle.cs | 74 + .../src/Generated/DocumentTable.cs | 71 + .../src/Generated/DocumentTableCell.cs | 79 + .../DocumentTypeDetails.Serialization.cs | 79 + .../src/Generated/DocumentTypeDetails.cs | 50 + .../src/Generated/DocumentWord.cs | 69 + .../src/Generated/InnerError.Serialization.cs | 58 + .../src/Generated/InnerError.cs | 44 + .../OperationDetails.Serialization.cs | 43 + .../src/Generated/OperationDetails.cs | 84 + .../src/Generated/OperationKind.cs | 63 + .../src/Generated/OperationStatus.cs | 60 + .../OperationSummary.Serialization.cs | 105 + .../src/Generated/OperationSummary.cs | 80 + .../Generated/QuotaDetails.Serialization.cs | 55 + .../src/Generated/QuotaDetails.cs | 33 + .../ResourceDetails.Serialization.cs | 47 + .../src/Generated/ResourceDetails.cs | 34 + .../src/Generated/SplitMode.cs | 54 + .../src/Generated/StringIndexType.cs | 60 + .../UnknownOperationDetails.Serialization.cs | 115 + .../src/Generated/UnknownOperationDetails.cs | 43 + .../src/Properties/AssemblyInfo.cs | 7 + ...Azure.AI.DocumentIntelligence.Tests.csproj | 25 + .../Samples/Samples_DocumentAnalysisClient.cs | 1103 +++++++++ ...mples_DocumentModelAdministrationClient.cs | 2088 +++++++++++++++++ .../tsp-location.yaml | 3 + sdk/documentintelligence/ci.yml | 35 + 116 files changed, 15133 insertions(+) create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/Azure.AI.DocumentIntelligence.sln create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/CHANGELOG.md create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/Directory.Build.props create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/README.md create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/AnalyzeResult.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Azure.AI.DocumentIntelligence.csproj create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AIDocumentIntelligenceClientBuilderExtensions.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AIDocumentIntelligenceModelFactory.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AddressValue.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AnalyzeDocumentRequest.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AnalyzeDocumentRequest.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AnalyzeResult.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AnalyzedDocument.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AuthorizeCopyRequest.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AuthorizeCopyRequest.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AzureAIDocumentIntelligenceClientOptions.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AzureBlobContentSource.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AzureBlobContentSource.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AzureBlobFileListContentSource.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AzureBlobFileListContentSource.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/BoundingRegion.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/BuildDocumentClassifierRequest.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/BuildDocumentClassifierRequest.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/BuildDocumentModelRequest.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/BuildDocumentModelRequest.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexBuildOperationDetails.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexBuildOperationDetails.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexDetails.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexDetails.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexSummary.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ClassifierDocumentTypeDetails.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ClassifierDocumentTypeDetails.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ClassifyDocumentRequest.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ClassifyDocumentRequest.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ComponentDocumentModelDetails.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ComponentDocumentModelDetails.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ComposeDocumentModelRequest.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ComposeDocumentModelRequest.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ContentFormat.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ContentSourceKind.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/CopyAuthorization.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/CopyAuthorization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/CurrencyValue.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/CustomDocumentModelsDetails.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/CustomDocumentModelsDetails.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/Docs/DocumentAnalysisClient.xml create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/Docs/DocumentModelAdministrationClient.xml create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentAnalysisClient.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentAnalysisFeature.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentBarcode.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentBuildMode.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentCaption.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentClassifierBuildOperationDetails.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentClassifierBuildOperationDetails.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentClassifierDetails.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentClassifierDetails.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentField.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFieldSchema.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFieldSchema.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFieldType.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFigure.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFootnote.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFormula.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentIntelligenceError.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentIntelligenceError.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentKeyValueElement.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentKeyValuePair.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentLanguage.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentLine.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentList.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentListItem.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelAdministrationClient.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelBuildOperationDetails.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelBuildOperationDetails.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelComposeOperationDetails.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelComposeOperationDetails.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelCopyToOperationDetails.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelCopyToOperationDetails.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelDetails.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelDetails.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelSummary.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelSummary.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentPage.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentParagraph.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSection.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSelectionMark.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSpan.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentStyle.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTable.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTableCell.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTypeDetails.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTypeDetails.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentWord.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/InnerError.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/InnerError.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationDetails.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationDetails.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationKind.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationStatus.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationSummary.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationSummary.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/QuotaDetails.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/QuotaDetails.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ResourceDetails.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ResourceDetails.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/SplitMode.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/StringIndexType.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/UnknownOperationDetails.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/UnknownOperationDetails.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Properties/AssemblyInfo.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Azure.AI.DocumentIntelligence.Tests.csproj create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Generated/Samples/Samples_DocumentAnalysisClient.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Generated/Samples/Samples_DocumentModelAdministrationClient.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/tsp-location.yaml create mode 100644 sdk/documentintelligence/ci.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 4881715dc984..9c093a8112b2 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -181,6 +181,7 @@ /sdk/cognitiveservices/Vision.Face/ @JinyuID @dipidoo @SteveMSFT @msyache @longli0 @ShaoAnLin @lulululululu # PRLabel: %Cognitive - Form Recognizer +/sdk/documentintelligence/ @kinelski @pallavit @joseharriaga /sdk/formrecognizer/ @kinelski @pallavit @joseharriaga # ServiceLabel: %Cognitive - Form Recognizer %Service Attention diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/Azure.AI.DocumentIntelligence.sln b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/Azure.AI.DocumentIntelligence.sln new file mode 100644 index 000000000000..aef15a7d054d --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/Azure.AI.DocumentIntelligence.sln @@ -0,0 +1,36 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.7.34031.279 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{ECC730C1-4AEA-420C-916A-66B19B79E4DC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.AI.DocumentIntelligence", "src\Azure.AI.DocumentIntelligence.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.AI.DocumentIntelligence.Tests", "tests\Azure.AI.DocumentIntelligence.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Release|Any CPU.Build.0 = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE} + EndGlobalSection +EndGlobal diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/CHANGELOG.md b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/CHANGELOG.md new file mode 100644 index 000000000000..13dd08af78ab --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/Directory.Build.props b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/README.md b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/README.md new file mode 100644 index 000000000000..87f8cd1d929e --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/README.md @@ -0,0 +1,86 @@ +# Azure.NewProject.TypeSpec client library for .NET + +Azure.NewProject.TypeSpec is a managed service that helps developers get secret simply and securely. + +Use the client library for to: + +* [Get secret](https://docs.microsoft.com/azure) + +[Source code][source_root] | [Package (NuGet)][package] | [API reference documentation][reference_docs] | [Product documentation][azconfig_docs] | [Samples][source_samples] + + [Source code](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src) | [Package (NuGet)](https://www.nuget.org/packages) | [API reference documentation](https://azure.github.io/azure-sdk-for-net) | [Product documentation](https://docs.microsoft.com/azure) + +## Getting started + +This section should include everything a developer needs to do to install and create their first client connection *very quickly*. + +### Install the package + +First, provide instruction for obtaining and installing the package or library. This section might include only a single line of code, like `dotnet add package package-name`, but should enable a developer to successfully install the package from NuGet, npm, or even cloning a GitHub repository. + +Install the client library for .NET with [NuGet](https://www.nuget.org/ ): + +```dotnetcli +dotnet add package Azure.NewProject.TypeSpec --prerelease +``` + +### Prerequisites + +Include a section after the install command that details any requirements that must be satisfied before a developer can [authenticate](#authenticate-the-client) and test all of the snippets in the [Examples](#examples) section. For example, for Cosmos DB: + +> You must have an [Azure subscription](https://azure.microsoft.com/free/dotnet/) and [Cosmos DB account](https://docs.microsoft.com/azure/cosmos-db/account-overview) (SQL API). In order to take advantage of the C# 8.0 syntax, it is recommended that you compile using the [.NET Core SDK](https://dotnet.microsoft.com/download) 3.0 or higher with a [language version](https://docs.microsoft.com/dotnet/csharp/language-reference/configure-language-version#override-a-default) of `latest`. It is also possible to compile with the .NET Core SDK 2.1.x using a language version of `preview`. + +### Authenticate the client + +If your library requires authentication for use, such as for Azure services, include instructions and example code needed for initializing and authenticating. + +For example, include details on obtaining an account key and endpoint URI, setting environment variables for each, and initializing the client object. + +## Key concepts + +The *Key concepts* section should describe the functionality of the main classes. Point out the most important and useful classes in the package (with links to their reference pages) and explain how those classes work together. Feel free to use bulleted lists, tables, code blocks, or even diagrams for clarity. + +Include the *Thread safety* and *Additional concepts* sections below at the end of your *Key concepts* section. You may remove or add links depending on what your library makes use of: + +### Thread safety + +We guarantee that all client instance methods are thread-safe and independent of each other ([guideline](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-service-methods-thread-safety)). This ensures that the recommendation of reusing client instances is always safe, even across threads. + +### Additional concepts + +[Client options](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#configuring-service-clients-using-clientoptions) | +[Accessing the response](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#accessing-http-response-details-using-responset) | +[Long-running operations](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#consuming-long-running-operations-using-operationt) | +[Handling failures](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#reporting-errors-requestfailedexception) | +[Diagnostics](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/Diagnostics.md) | +[Mocking](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#mocking) | +[Client lifetime](https://devblogs.microsoft.com/azure-sdk/lifetime-management-and-thread-safety-guarantees-of-azure-sdk-net-clients/) + + +## Examples + +You can familiarize yourself with different APIs using [Samples](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/samples). + +## Troubleshooting + +Describe common errors and exceptions, how to "unpack" them if necessary, and include guidance for graceful handling and recovery. + +Provide information to help developers avoid throttling or other service-enforced errors they might encounter. For example, provide guidance and examples for using retry or connection policies in the API. + +If the package or a related package supports it, include tips for logging or enabling instrumentation to help them debug their code. + +## Next steps + +* Provide a link to additional code examples, ideally to those sitting alongside the README in the package's `/samples` directory. +* If appropriate, point users to other packages that might be useful. +* If you think there's a good chance that developers might stumble across your package in error (because they're searching for specific functionality and mistakenly think the package provides that functionality), point them to the packages they might be looking for. + +## Contributing + +This is a template, but your SDK readme should include details on how to contribute code to the repo/package. + + +[style-guide-msft]: https://docs.microsoft.com/style-guide/capitalization +[style-guide-cloud]: https://aka.ms/azsdk/cloud-style-guide + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-net/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/README.png) diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/AnalyzeResult.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/AnalyzeResult.Serialization.cs new file mode 100644 index 000000000000..0f077e9d7eb8 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/AnalyzeResult.Serialization.cs @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.AI.DocumentIntelligence +{ + public partial class AnalyzeResult + { + // AnalyzeResult.FromResponse was not included in the generated code, but it should be. + // This is just a workaround while this issue is not fixed or while we don't implement + // deserialization manually. + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AnalyzeResult FromResponse(Response response) + { + return null; + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Azure.AI.DocumentIntelligence.csproj b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Azure.AI.DocumentIntelligence.csproj new file mode 100644 index 000000000000..ffd4805b6279 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Azure.AI.DocumentIntelligence.csproj @@ -0,0 +1,21 @@ + + + This is the Azure.AI.DocumentIntelligence client library for developing .NET applications with rich experience. + Azure SDK Code Generation Azure.AI.DocumentIntelligence for Azure Data Plane + 1.0.0-beta.1 + Microsoft Azure Document Intelligence Cognitive Services Applied AI Form Recognizer + $(RequiredTargetFrameworks) + true + + + + + + + + + + + + + diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AIDocumentIntelligenceClientBuilderExtensions.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AIDocumentIntelligenceClientBuilderExtensions.cs new file mode 100644 index 000000000000..e96573066650 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AIDocumentIntelligenceClientBuilderExtensions.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure; +using Azure.AI.DocumentIntelligence; +using Azure.Core.Extensions; + +namespace Microsoft.Extensions.Azure +{ + /// Extension methods to add , to client builder. + public static partial class AIDocumentIntelligenceClientBuilderExtensions + { + /// Registers a instance. + /// The builder to register with. + /// The Document Intelligence service endpoint. + /// A credential used to authenticate to an Azure Service. + public static IAzureClientBuilder AddDocumentAnalysisClient(this TBuilder builder, Uri endpoint, AzureKeyCredential credential) + where TBuilder : IAzureClientFactoryBuilder + { + return builder.RegisterClientFactory((options) => new DocumentAnalysisClient(endpoint, credential, options)); + } + + /// Registers a instance. + /// The builder to register with. + /// The Document Intelligence service endpoint. + /// A credential used to authenticate to an Azure Service. + public static IAzureClientBuilder AddDocumentModelAdministrationClient(this TBuilder builder, Uri endpoint, AzureKeyCredential credential) + where TBuilder : IAzureClientFactoryBuilder + { + return builder.RegisterClientFactory((options) => new DocumentModelAdministrationClient(endpoint, credential, options)); + } + + /// Registers a instance. + /// The builder to register with. + /// The configuration values. + public static IAzureClientBuilder AddDocumentAnalysisClient(this TBuilder builder, TConfiguration configuration) + where TBuilder : IAzureClientFactoryBuilderWithConfiguration + { + return builder.RegisterClientFactory(configuration); + } + /// Registers a instance. + /// The builder to register with. + /// The configuration values. + public static IAzureClientBuilder AddDocumentModelAdministrationClient(this TBuilder builder, TConfiguration configuration) + where TBuilder : IAzureClientFactoryBuilderWithConfiguration + { + return builder.RegisterClientFactory(configuration); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AIDocumentIntelligenceModelFactory.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AIDocumentIntelligenceModelFactory.cs new file mode 100644 index 000000000000..aebd057f81eb --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AIDocumentIntelligenceModelFactory.cs @@ -0,0 +1,316 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.AI.DocumentIntelligence +{ + /// Model factory for models. + public static partial class AIDocumentIntelligenceModelFactory + { + /// Initializes a new instance of DocumentModelSummary. + /// Unique document model name. + /// Document model description. + /// Date and time (UTC) when the document model was created. + /// Date and time (UTC) when the document model will expire. + /// API version used to create this document model. + /// List of key-value tag attributes associated with the document model. + /// A new instance for mocking. + public static DocumentModelSummary DocumentModelSummary(string modelId = null, string description = null, DateTimeOffset createdDateTime = default, DateTimeOffset? expirationDateTime = null, string apiVersion = null, IReadOnlyDictionary tags = null) + { + tags ??= new Dictionary(); + + return new DocumentModelSummary(modelId, description, createdDateTime, expirationDateTime, apiVersion, tags); + } + + /// Initializes a new instance of DocumentModelDetails. + /// Unique document model name. + /// Document model description. + /// Date and time (UTC) when the document model was created. + /// Date and time (UTC) when the document model will expire. + /// API version used to create this document model. + /// List of key-value tag attributes associated with the document model. + /// Custom document model build mode. + /// + /// Azure Blob Storage location containing the training data. Either + /// azureBlobSource or azureBlobFileListSource must be specified. + /// + /// + /// Azure Blob Storage file list specifying the training data. Either + /// azureBlobSource or azureBlobFileListSource must be specified. + /// + /// Supported document types. + /// A new instance for mocking. + public static DocumentModelDetails DocumentModelDetails(string modelId = null, string description = null, DateTimeOffset createdDateTime = default, DateTimeOffset? expirationDateTime = null, string apiVersion = null, IReadOnlyDictionary tags = null, DocumentBuildMode buildMode = default, AzureBlobContentSource azureBlobSource = null, AzureBlobFileListContentSource azureBlobFileListSource = null, IReadOnlyDictionary docTypes = null) + { + tags ??= new Dictionary(); + docTypes ??= new Dictionary(); + + return new DocumentModelDetails(modelId, description, createdDateTime, expirationDateTime, apiVersion, tags, buildMode, azureBlobSource, azureBlobFileListSource, docTypes); + } + + /// Initializes a new instance of DocumentTypeDetails. + /// Document model description. + /// Custom document model build mode. + /// Description of the document semantic schema using a JSON Schema style syntax. + /// Estimated confidence for each field. + /// A new instance for mocking. + public static DocumentTypeDetails DocumentTypeDetails(string description = null, DocumentBuildMode? buildMode = null, IReadOnlyDictionary fieldSchema = null, IReadOnlyDictionary fieldConfidence = null) + { + fieldSchema ??= new Dictionary(); + fieldConfidence ??= new Dictionary(); + + return new DocumentTypeDetails(description, buildMode, fieldSchema, fieldConfidence); + } + + /// Initializes a new instance of DocumentFieldSchema. + /// Semantic data type of the field value. + /// Field description. + /// Example field content. + /// Field type schema of each array element. + /// Named sub-fields of the object field. + /// A new instance for mocking. + public static DocumentFieldSchema DocumentFieldSchema(DocumentFieldType type = default, string description = null, string example = null, DocumentFieldSchema items = null, IReadOnlyDictionary properties = null) + { + properties ??= new Dictionary(); + + return new DocumentFieldSchema(type, description, example, items, properties); + } + + /// Initializes a new instance of ResourceDetails. + /// Details regarding custom document models. + /// Quota used, limit, and next reset date/time. + /// or is null. + /// A new instance for mocking. + public static ResourceDetails ResourceDetails(CustomDocumentModelsDetails customDocumentModels = null, QuotaDetails customNeuralDocumentModelBuilds = null) + { + if (customDocumentModels == null) + { + throw new ArgumentNullException(nameof(customDocumentModels)); + } + if (customNeuralDocumentModelBuilds == null) + { + throw new ArgumentNullException(nameof(customNeuralDocumentModelBuilds)); + } + + return new ResourceDetails(customDocumentModels, customNeuralDocumentModelBuilds); + } + + /// Initializes a new instance of CustomDocumentModelsDetails. + /// Number of custom document models in the current resource. + /// Maximum number of custom document models supported in the current resource. + /// A new instance for mocking. + public static CustomDocumentModelsDetails CustomDocumentModelsDetails(int count = default, int limit = default) + { + return new CustomDocumentModelsDetails(count, limit); + } + + /// Initializes a new instance of QuotaDetails. + /// Amount of the resource quota used. + /// Resource quota limit. + /// Date/time when the resource quota usage will be reset. + /// A new instance for mocking. + public static QuotaDetails QuotaDetails(int used = default, int quota = default, DateTimeOffset quotaResetDateTime = default) + { + return new QuotaDetails(used, quota, quotaResetDateTime); + } + + /// Initializes a new instance of OperationDetails. + /// Operation ID. + /// Operation status. + /// Operation progress (0-100). + /// Date and time (UTC) when the operation was created. + /// Date and time (UTC) when the status was last updated. + /// Type of operation. + /// URL of the resource targeted by this operation. + /// API version used to create this operation. + /// List of key-value tag attributes associated with the document model. + /// Encountered error. + /// A new instance for mocking. + public static OperationDetails OperationDetails(Guid operationId = default, OperationStatus status = default, int? percentCompleted = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, string kind = "Unknown", Uri resourceLocation = null, string apiVersion = null, IReadOnlyDictionary tags = null, DocumentIntelligenceError error = null) + { + tags ??= new Dictionary(); + + return new UnknownOperationDetails(operationId, status, percentCompleted, createdDateTime, lastUpdatedDateTime, kind, resourceLocation, apiVersion, tags, error); + } + + /// Initializes a new instance of DocumentIntelligenceError. + /// Error code. + /// Error message. + /// Target of the error. + /// List of detailed errors. + /// Detailed error. + /// A new instance for mocking. + public static DocumentIntelligenceError DocumentIntelligenceError(string code = null, string message = null, string target = null, IEnumerable details = null, InnerError innererror = null) + { + details ??= new List(); + + return new DocumentIntelligenceError(code, message, target, details?.ToList(), innererror); + } + + /// Initializes a new instance of InnerError. + /// Error code. + /// Error message. + /// Detailed error. + /// A new instance for mocking. + public static InnerError InnerError(string code = null, string message = null, InnerError innererror = null) + { + return new InnerError(code, message, innererror); + } + + /// Initializes a new instance of DocumentModelBuildOperationDetails. + /// Operation ID. + /// Operation status. + /// Operation progress (0-100). + /// Date and time (UTC) when the operation was created. + /// Date and time (UTC) when the status was last updated. + /// URL of the resource targeted by this operation. + /// API version used to create this operation. + /// List of key-value tag attributes associated with the document model. + /// Encountered error. + /// Operation result upon success. + /// A new instance for mocking. + public static DocumentModelBuildOperationDetails DocumentModelBuildOperationDetails(Guid operationId = default, OperationStatus status = default, int? percentCompleted = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, Uri resourceLocation = null, string apiVersion = null, IReadOnlyDictionary tags = null, DocumentIntelligenceError error = null, DocumentModelDetails result = null) + { + tags ??= new Dictionary(); + + return new DocumentModelBuildOperationDetails(operationId, status, percentCompleted, createdDateTime, lastUpdatedDateTime, OperationKind.DocumentModelBuild, resourceLocation, apiVersion, tags, error, result); + } + + /// Initializes a new instance of DocumentModelComposeOperationDetails. + /// Operation ID. + /// Operation status. + /// Operation progress (0-100). + /// Date and time (UTC) when the operation was created. + /// Date and time (UTC) when the status was last updated. + /// URL of the resource targeted by this operation. + /// API version used to create this operation. + /// List of key-value tag attributes associated with the document model. + /// Encountered error. + /// Operation result upon success. + /// A new instance for mocking. + public static DocumentModelComposeOperationDetails DocumentModelComposeOperationDetails(Guid operationId = default, OperationStatus status = default, int? percentCompleted = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, Uri resourceLocation = null, string apiVersion = null, IReadOnlyDictionary tags = null, DocumentIntelligenceError error = null, DocumentModelDetails result = null) + { + tags ??= new Dictionary(); + + return new DocumentModelComposeOperationDetails(operationId, status, percentCompleted, createdDateTime, lastUpdatedDateTime, OperationKind.DocumentModelCompose, resourceLocation, apiVersion, tags, error, result); + } + + /// Initializes a new instance of DocumentModelCopyToOperationDetails. + /// Operation ID. + /// Operation status. + /// Operation progress (0-100). + /// Date and time (UTC) when the operation was created. + /// Date and time (UTC) when the status was last updated. + /// URL of the resource targeted by this operation. + /// API version used to create this operation. + /// List of key-value tag attributes associated with the document model. + /// Encountered error. + /// Operation result upon success. + /// A new instance for mocking. + public static DocumentModelCopyToOperationDetails DocumentModelCopyToOperationDetails(Guid operationId = default, OperationStatus status = default, int? percentCompleted = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, Uri resourceLocation = null, string apiVersion = null, IReadOnlyDictionary tags = null, DocumentIntelligenceError error = null, DocumentModelDetails result = null) + { + tags ??= new Dictionary(); + + return new DocumentModelCopyToOperationDetails(operationId, status, percentCompleted, createdDateTime, lastUpdatedDateTime, OperationKind.DocumentModelCopyTo, resourceLocation, apiVersion, tags, error, result); + } + + /// Initializes a new instance of DocumentClassifierBuildOperationDetails. + /// Operation ID. + /// Operation status. + /// Operation progress (0-100). + /// Date and time (UTC) when the operation was created. + /// Date and time (UTC) when the status was last updated. + /// URL of the resource targeted by this operation. + /// API version used to create this operation. + /// List of key-value tag attributes associated with the document model. + /// Encountered error. + /// Operation result upon success. + /// A new instance for mocking. + public static DocumentClassifierBuildOperationDetails DocumentClassifierBuildOperationDetails(Guid operationId = default, OperationStatus status = default, int? percentCompleted = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, Uri resourceLocation = null, string apiVersion = null, IReadOnlyDictionary tags = null, DocumentIntelligenceError error = null, DocumentClassifierDetails result = null) + { + tags ??= new Dictionary(); + + return new DocumentClassifierBuildOperationDetails(operationId, status, percentCompleted, createdDateTime, lastUpdatedDateTime, OperationKind.DocumentClassifierBuild, resourceLocation, apiVersion, tags, error, result); + } + + /// Initializes a new instance of DocumentClassifierDetails. + /// Unique document classifier name. + /// Document classifier description. + /// Date and time (UTC) when the document classifier was created. + /// Date and time (UTC) when the document classifier will expire. + /// API version used to create this document classifier. + /// List of document types to classify against. + /// A new instance for mocking. + public static DocumentClassifierDetails DocumentClassifierDetails(string classifierId = null, string description = null, DateTimeOffset createdDateTime = default, DateTimeOffset? expirationDateTime = null, string apiVersion = null, IReadOnlyDictionary docTypes = null) + { + docTypes ??= new Dictionary(); + + return new DocumentClassifierDetails(classifierId, description, createdDateTime, expirationDateTime, apiVersion, docTypes); + } + + /// Initializes a new instance of ChatIndexBuildOperationDetails. + /// Operation ID. + /// Operation status. + /// Operation progress (0-100). + /// Date and time (UTC) when the operation was created. + /// Date and time (UTC) when the status was last updated. + /// URL of the resource targeted by this operation. + /// API version used to create this operation. + /// List of key-value tag attributes associated with the document model. + /// Encountered error. + /// Operation result upon success. + /// A new instance for mocking. + public static ChatIndexBuildOperationDetails ChatIndexBuildOperationDetails(Guid operationId = default, OperationStatus status = default, int? percentCompleted = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, Uri resourceLocation = null, string apiVersion = null, IReadOnlyDictionary tags = null, DocumentIntelligenceError error = null, ChatIndexDetails result = null) + { + tags ??= new Dictionary(); + + return new ChatIndexBuildOperationDetails(operationId, status, percentCompleted, createdDateTime, lastUpdatedDateTime, OperationKind.ChatBuild, resourceLocation, apiVersion, tags, error, result); + } + + /// Initializes a new instance of ChatIndexDetails. + /// Chat index ID. + /// Date and time (UTC) when the index was created. + /// Date and time (UTC) when the index will expire. + /// API version used to create this index. + /// or is null. + /// A new instance for mocking. + public static ChatIndexDetails ChatIndexDetails(string chatId = null, DateTimeOffset createdDateTime = default, DateTimeOffset expirationDateTime = default, string apiVersion = null) + { + if (chatId == null) + { + throw new ArgumentNullException(nameof(chatId)); + } + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + return new ChatIndexDetails(chatId, createdDateTime, expirationDateTime, apiVersion); + } + + /// Initializes a new instance of OperationSummary. + /// Operation ID. + /// Operation status. + /// Operation progress (0-100). + /// Date and time (UTC) when the operation was created. + /// Date and time (UTC) when the status was last updated. + /// Type of operation. + /// URL of the resource targeted by this operation. + /// API version used to create this operation. + /// List of key-value tag attributes associated with the document model. + /// A new instance for mocking. + public static OperationSummary OperationSummary(Guid operationId = default, OperationStatus status = default, int? percentCompleted = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, OperationKind kind = default, Uri resourceLocation = null, string apiVersion = null, IReadOnlyDictionary tags = null) + { + tags ??= new Dictionary(); + + return new OperationSummary(operationId, status, percentCompleted, createdDateTime, lastUpdatedDateTime, kind, resourceLocation, apiVersion, tags); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AddressValue.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AddressValue.cs new file mode 100644 index 000000000000..e7f45fcaa5cd --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AddressValue.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.AI.DocumentIntelligence +{ + /// Address field value. + public partial class AddressValue + { + /// Initializes a new instance of AddressValue. + internal AddressValue() + { + } + + /// Initializes a new instance of AddressValue. + /// House or building number. + /// Post office box number. + /// Street name. + /// Name of city, town, village, etc. + /// First-level administrative division. + /// Postal code used for mail sorting. + /// Country/region. + /// Street-level address, excluding city, state, countryRegion, and postalCode. + /// Apartment or office number. + /// + /// Districts or boroughs within a city, such as Brooklyn in New York City or City + /// of Westminster in London. + /// + /// Second-level administrative division used in certain locales. + /// Unofficial neighborhood name, like Chinatown. + /// Build name, such as World Trade Center. + /// Floor number, such as 3F. + internal AddressValue(string houseNumber, string poBox, string road, string city, string state, string postalCode, string countryRegion, string streetAddress, string unit, string cityDistrict, string stateDistrict, string suburb, string house, string level) + { + HouseNumber = houseNumber; + PoBox = poBox; + Road = road; + City = city; + State = state; + PostalCode = postalCode; + CountryRegion = countryRegion; + StreetAddress = streetAddress; + Unit = unit; + CityDistrict = cityDistrict; + StateDistrict = stateDistrict; + Suburb = suburb; + House = house; + Level = level; + } + + /// House or building number. + public string HouseNumber { get; } + /// Post office box number. + public string PoBox { get; } + /// Street name. + public string Road { get; } + /// Name of city, town, village, etc. + public string City { get; } + /// First-level administrative division. + public string State { get; } + /// Postal code used for mail sorting. + public string PostalCode { get; } + /// Country/region. + public string CountryRegion { get; } + /// Street-level address, excluding city, state, countryRegion, and postalCode. + public string StreetAddress { get; } + /// Apartment or office number. + public string Unit { get; } + /// + /// Districts or boroughs within a city, such as Brooklyn in New York City or City + /// of Westminster in London. + /// + public string CityDistrict { get; } + /// Second-level administrative division used in certain locales. + public string StateDistrict { get; } + /// Unofficial neighborhood name, like Chinatown. + public string Suburb { get; } + /// Build name, such as World Trade Center. + public string House { get; } + /// Floor number, such as 3F. + public string Level { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AnalyzeDocumentRequest.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AnalyzeDocumentRequest.Serialization.cs new file mode 100644 index 000000000000..d6a7f0dcb4a6 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AnalyzeDocumentRequest.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class AnalyzeDocumentRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(UrlSource)) + { + writer.WritePropertyName("urlSource"u8); + writer.WriteStringValue(UrlSource.AbsoluteUri); + } + if (Optional.IsDefined(Base64Source)) + { + writer.WritePropertyName("base64Source"u8); + writer.WriteBase64StringValue(Base64Source.ToArray(), "D"); + } + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AnalyzeDocumentRequest.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AnalyzeDocumentRequest.cs new file mode 100644 index 000000000000..9e86ebe7bad5 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AnalyzeDocumentRequest.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.AI.DocumentIntelligence +{ + /// Document analysis parameters. + public partial class AnalyzeDocumentRequest + { + /// Initializes a new instance of AnalyzeDocumentRequest. + public AnalyzeDocumentRequest() + { + } + + /// Initializes a new instance of AnalyzeDocumentRequest. + /// Document URL to analyze. Either urlSource or base64Source must be specified. + /// + /// Base64 encoding of the document to analyze. Either urlSource or base64Source + /// must be specified. + /// + internal AnalyzeDocumentRequest(Uri urlSource, BinaryData base64Source) + { + UrlSource = urlSource; + Base64Source = base64Source; + } + + /// Document URL to analyze. Either urlSource or base64Source must be specified. + public Uri UrlSource { get; set; } + /// + /// Base64 encoding of the document to analyze. Either urlSource or base64Source + /// must be specified. + /// + /// To assign a byte[] to this property use . + /// The byte[] will be serialized to a Base64 encoded string. + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromBytes(new byte[] { 1, 2, 3 }) + /// Creates a payload of "AQID". + /// + /// + /// + /// + public BinaryData Base64Source { get; set; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AnalyzeResult.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AnalyzeResult.cs new file mode 100644 index 000000000000..ca0155252697 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AnalyzeResult.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// Document analysis result. + public partial class AnalyzeResult + { + /// Initializes a new instance of AnalyzeResult. + /// API version used to produce this result. + /// Document model ID used to produce this result. + /// Method used to compute string offset and length. + /// + /// Concatenate string representation of all textual and visual elements in reading + /// order. + /// + /// Analyzed pages. + /// , , or is null. + internal AnalyzeResult(string apiVersion, string modelId, StringIndexType stringIndexType, string content, IEnumerable pages) + { + Argument.AssertNotNull(apiVersion, nameof(apiVersion)); + Argument.AssertNotNull(modelId, nameof(modelId)); + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(pages, nameof(pages)); + + ApiVersion = apiVersion; + ModelId = modelId; + StringIndexType = stringIndexType; + Content = content; + Pages = pages.ToList(); + Paragraphs = new ChangeTrackingList(); + Tables = new ChangeTrackingList(); + Figures = new ChangeTrackingList(); + Lists = new ChangeTrackingList(); + Sections = new ChangeTrackingList(); + KeyValuePairs = new ChangeTrackingList(); + Styles = new ChangeTrackingList(); + Languages = new ChangeTrackingList(); + Documents = new ChangeTrackingList(); + } + + /// Initializes a new instance of AnalyzeResult. + /// API version used to produce this result. + /// Document model ID used to produce this result. + /// Method used to compute string offset and length. + /// Format of the analyze result top-level content. + /// + /// Concatenate string representation of all textual and visual elements in reading + /// order. + /// + /// Analyzed pages. + /// Extracted paragraphs. + /// Extracted tables. + /// Extracted figures. + /// Extracted lists. + /// Extracted sections. + /// Extracted key-value pairs. + /// Extracted font styles. + /// Detected languages. + /// Extracted documents. + internal AnalyzeResult(string apiVersion, string modelId, StringIndexType stringIndexType, ContentFormat? contentFormat, string content, IReadOnlyList pages, IReadOnlyList paragraphs, IReadOnlyList tables, IReadOnlyList figures, IReadOnlyList lists, IReadOnlyList sections, IReadOnlyList keyValuePairs, IReadOnlyList styles, IReadOnlyList languages, IReadOnlyList documents) + { + ApiVersion = apiVersion; + ModelId = modelId; + StringIndexType = stringIndexType; + ContentFormat = contentFormat; + Content = content; + Pages = pages; + Paragraphs = paragraphs; + Tables = tables; + Figures = figures; + Lists = lists; + Sections = sections; + KeyValuePairs = keyValuePairs; + Styles = styles; + Languages = languages; + Documents = documents; + } + + /// API version used to produce this result. + public string ApiVersion { get; } + /// Document model ID used to produce this result. + public string ModelId { get; } + /// Method used to compute string offset and length. + public StringIndexType StringIndexType { get; } + /// Format of the analyze result top-level content. + public ContentFormat? ContentFormat { get; } + /// + /// Concatenate string representation of all textual and visual elements in reading + /// order. + /// + public string Content { get; } + /// Analyzed pages. + public IReadOnlyList Pages { get; } + /// Extracted paragraphs. + public IReadOnlyList Paragraphs { get; } + /// Extracted tables. + public IReadOnlyList Tables { get; } + /// Extracted figures. + public IReadOnlyList Figures { get; } + /// Extracted lists. + public IReadOnlyList Lists { get; } + /// Extracted sections. + public IReadOnlyList Sections { get; } + /// Extracted key-value pairs. + public IReadOnlyList KeyValuePairs { get; } + /// Extracted font styles. + public IReadOnlyList Styles { get; } + /// Detected languages. + public IReadOnlyList Languages { get; } + /// Extracted documents. + public IReadOnlyList Documents { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AnalyzedDocument.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AnalyzedDocument.cs new file mode 100644 index 000000000000..9c66ea29671a --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AnalyzedDocument.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// An object describing the location and semantic content of a document. + public partial class AnalyzedDocument + { + /// Initializes a new instance of AnalyzedDocument. + /// Document type. + /// Location of the document in the reading order concatenated content. + /// Confidence of correctly extracting the document. + /// or is null. + internal AnalyzedDocument(string docType, IEnumerable spans, float confidence) + { + Argument.AssertNotNull(docType, nameof(docType)); + Argument.AssertNotNull(spans, nameof(spans)); + + DocType = docType; + BoundingRegions = new ChangeTrackingList(); + Spans = spans.ToList(); + Fields = new ChangeTrackingDictionary(); + Confidence = confidence; + } + + /// Initializes a new instance of AnalyzedDocument. + /// Document type. + /// Bounding regions covering the document. + /// Location of the document in the reading order concatenated content. + /// Dictionary of named field values. + /// Confidence of correctly extracting the document. + internal AnalyzedDocument(string docType, IReadOnlyList boundingRegions, IReadOnlyList spans, IReadOnlyDictionary fields, float confidence) + { + DocType = docType; + BoundingRegions = boundingRegions; + Spans = spans; + Fields = fields; + Confidence = confidence; + } + + /// Document type. + public string DocType { get; } + /// Bounding regions covering the document. + public IReadOnlyList BoundingRegions { get; } + /// Location of the document in the reading order concatenated content. + public IReadOnlyList Spans { get; } + /// Dictionary of named field values. + public IReadOnlyDictionary Fields { get; } + /// Confidence of correctly extracting the document. + public float Confidence { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AuthorizeCopyRequest.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AuthorizeCopyRequest.Serialization.cs new file mode 100644 index 000000000000..df5b369a1607 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AuthorizeCopyRequest.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class AuthorizeCopyRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("modelId"u8); + writer.WriteStringValue(ModelId); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AuthorizeCopyRequest.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AuthorizeCopyRequest.cs new file mode 100644 index 000000000000..dab2b56d63d0 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AuthorizeCopyRequest.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// Request body to authorize document model copy. + public partial class AuthorizeCopyRequest + { + /// Initializes a new instance of AuthorizeCopyRequest. + /// Unique document model name. + /// is null. + public AuthorizeCopyRequest(string modelId) + { + Argument.AssertNotNull(modelId, nameof(modelId)); + + ModelId = modelId; + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of AuthorizeCopyRequest. + /// Unique document model name. + /// Document model description. + /// List of key-value tag attributes associated with the document model. + internal AuthorizeCopyRequest(string modelId, string description, IDictionary tags) + { + ModelId = modelId; + Description = description; + Tags = tags; + } + + /// Unique document model name. + public string ModelId { get; } + /// Document model description. + public string Description { get; set; } + /// List of key-value tag attributes associated with the document model. + public IDictionary Tags { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AzureAIDocumentIntelligenceClientOptions.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AzureAIDocumentIntelligenceClientOptions.cs new file mode 100644 index 000000000000..ae5d4d3636be --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AzureAIDocumentIntelligenceClientOptions.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// Client options for Azure.AI.DocumentIntelligence library clients. + public partial class AzureAIDocumentIntelligenceClientOptions : ClientOptions + { + private const ServiceVersion LatestVersion = ServiceVersion.V2023_10_31_Preview; + + /// The version of the service to use. + public enum ServiceVersion + { + /// Service version "2022-08-31". + V2022_08_31 = 1, + /// Service version "2023-07-31". + V2023_07_31 = 2, + /// Service version "2023-10-31-preview". + V2023_10_31_Preview = 3, + } + + internal string Version { get; } + + /// Initializes new instance of AzureAIDocumentIntelligenceClientOptions. + public AzureAIDocumentIntelligenceClientOptions(ServiceVersion version = LatestVersion) + { + Version = version switch + { + ServiceVersion.V2022_08_31 => "2022-08-31", + ServiceVersion.V2023_07_31 => "2023-07-31", + ServiceVersion.V2023_10_31_Preview => "2023-10-31-preview", + _ => throw new NotSupportedException() + }; + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AzureBlobContentSource.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AzureBlobContentSource.Serialization.cs new file mode 100644 index 000000000000..e6445bfde54a --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AzureBlobContentSource.Serialization.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class AzureBlobContentSource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("containerUrl"u8); + writer.WriteStringValue(ContainerUrl.AbsoluteUri); + if (Optional.IsDefined(Prefix)) + { + writer.WritePropertyName("prefix"u8); + writer.WriteStringValue(Prefix); + } + writer.WriteEndObject(); + } + + internal static AzureBlobContentSource DeserializeAzureBlobContentSource(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Uri containerUrl = default; + Optional prefix = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("containerUrl"u8)) + { + containerUrl = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("prefix"u8)) + { + prefix = property.Value.GetString(); + continue; + } + } + return new AzureBlobContentSource(containerUrl, prefix.Value); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AzureBlobContentSource FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAzureBlobContentSource(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AzureBlobContentSource.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AzureBlobContentSource.cs new file mode 100644 index 000000000000..c48977277eb8 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AzureBlobContentSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// Azure Blob Storage content. + public partial class AzureBlobContentSource + { + /// Initializes a new instance of AzureBlobContentSource. + /// Azure Blob Storage container URL. + /// is null. + public AzureBlobContentSource(Uri containerUrl) + { + Argument.AssertNotNull(containerUrl, nameof(containerUrl)); + + ContainerUrl = containerUrl; + } + + /// Initializes a new instance of AzureBlobContentSource. + /// Azure Blob Storage container URL. + /// Blob name prefix. + internal AzureBlobContentSource(Uri containerUrl, string prefix) + { + ContainerUrl = containerUrl; + Prefix = prefix; + } + + /// Azure Blob Storage container URL. + public Uri ContainerUrl { get; set; } + /// Blob name prefix. + public string Prefix { get; set; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AzureBlobFileListContentSource.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AzureBlobFileListContentSource.Serialization.cs new file mode 100644 index 000000000000..b19a9dbfdf64 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AzureBlobFileListContentSource.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class AzureBlobFileListContentSource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("containerUrl"u8); + writer.WriteStringValue(ContainerUrl.AbsoluteUri); + writer.WritePropertyName("fileList"u8); + writer.WriteStringValue(FileList); + writer.WriteEndObject(); + } + + internal static AzureBlobFileListContentSource DeserializeAzureBlobFileListContentSource(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Uri containerUrl = default; + string fileList = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("containerUrl"u8)) + { + containerUrl = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("fileList"u8)) + { + fileList = property.Value.GetString(); + continue; + } + } + return new AzureBlobFileListContentSource(containerUrl, fileList); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AzureBlobFileListContentSource FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAzureBlobFileListContentSource(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AzureBlobFileListContentSource.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AzureBlobFileListContentSource.cs new file mode 100644 index 000000000000..2573f8baca74 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AzureBlobFileListContentSource.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// File list in Azure Blob Storage. + public partial class AzureBlobFileListContentSource + { + /// Initializes a new instance of AzureBlobFileListContentSource. + /// Azure Blob Storage container URL. + /// Path to a JSONL file within the container specifying a subset of documents. + /// or is null. + public AzureBlobFileListContentSource(Uri containerUrl, string fileList) + { + Argument.AssertNotNull(containerUrl, nameof(containerUrl)); + Argument.AssertNotNull(fileList, nameof(fileList)); + + ContainerUrl = containerUrl; + FileList = fileList; + } + + /// Azure Blob Storage container URL. + public Uri ContainerUrl { get; set; } + /// Path to a JSONL file within the container specifying a subset of documents. + public string FileList { get; set; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/BoundingRegion.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/BoundingRegion.cs new file mode 100644 index 000000000000..127ba9a92005 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/BoundingRegion.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// Bounding polygon on a specific page of the input. + public partial class BoundingRegion + { + /// Initializes a new instance of BoundingRegion. + /// 1-based page number of page containing the bounding region. + /// + /// Bounding polygon on the page, or the entire page if not specified. + /// Coordinates specified relative to the top-left of the page. The numbers + /// represent the x, y values of the polygon vertices, clockwise from the left + /// (-180 degrees inclusive) relative to the element orientation. + /// + /// is null. + internal BoundingRegion(int pageNumber, IEnumerable polygon) + { + Argument.AssertNotNull(polygon, nameof(polygon)); + + PageNumber = pageNumber; + Polygon = polygon.ToList(); + } + + /// Initializes a new instance of BoundingRegion. + /// 1-based page number of page containing the bounding region. + /// + /// Bounding polygon on the page, or the entire page if not specified. + /// Coordinates specified relative to the top-left of the page. The numbers + /// represent the x, y values of the polygon vertices, clockwise from the left + /// (-180 degrees inclusive) relative to the element orientation. + /// + internal BoundingRegion(int pageNumber, IReadOnlyList polygon) + { + PageNumber = pageNumber; + Polygon = polygon; + } + + /// 1-based page number of page containing the bounding region. + public int PageNumber { get; } + /// + /// Bounding polygon on the page, or the entire page if not specified. + /// Coordinates specified relative to the top-left of the page. The numbers + /// represent the x, y values of the polygon vertices, clockwise from the left + /// (-180 degrees inclusive) relative to the element orientation. + /// + public IReadOnlyList Polygon { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/BuildDocumentClassifierRequest.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/BuildDocumentClassifierRequest.Serialization.cs new file mode 100644 index 000000000000..ed47c74768ab --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/BuildDocumentClassifierRequest.Serialization.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class BuildDocumentClassifierRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("classifierId"u8); + writer.WriteStringValue(ClassifierId); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + writer.WritePropertyName("docTypes"u8); + writer.WriteStartObject(); + foreach (var item in DocTypes) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/BuildDocumentClassifierRequest.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/BuildDocumentClassifierRequest.cs new file mode 100644 index 000000000000..111dcccba29f --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/BuildDocumentClassifierRequest.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// Request body to build a new custom document classifier. + public partial class BuildDocumentClassifierRequest + { + /// Initializes a new instance of BuildDocumentClassifierRequest. + /// Unique document classifier name. + /// List of document types to classify against. + /// or is null. + public BuildDocumentClassifierRequest(string classifierId, IDictionary docTypes) + { + Argument.AssertNotNull(classifierId, nameof(classifierId)); + Argument.AssertNotNull(docTypes, nameof(docTypes)); + + ClassifierId = classifierId; + DocTypes = docTypes; + } + + /// Initializes a new instance of BuildDocumentClassifierRequest. + /// Unique document classifier name. + /// Document classifier description. + /// List of document types to classify against. + internal BuildDocumentClassifierRequest(string classifierId, string description, IDictionary docTypes) + { + ClassifierId = classifierId; + Description = description; + DocTypes = docTypes; + } + + /// Unique document classifier name. + public string ClassifierId { get; } + /// Document classifier description. + public string Description { get; set; } + /// List of document types to classify against. + public IDictionary DocTypes { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/BuildDocumentModelRequest.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/BuildDocumentModelRequest.Serialization.cs new file mode 100644 index 000000000000..1f5b42049c39 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/BuildDocumentModelRequest.Serialization.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class BuildDocumentModelRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("modelId"u8); + writer.WriteStringValue(ModelId); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + writer.WritePropertyName("buildMode"u8); + writer.WriteStringValue(BuildMode.ToString()); + if (Optional.IsDefined(AzureBlobSource)) + { + writer.WritePropertyName("azureBlobSource"u8); + writer.WriteObjectValue(AzureBlobSource); + } + if (Optional.IsDefined(AzureBlobFileListSource)) + { + writer.WritePropertyName("azureBlobFileListSource"u8); + writer.WriteObjectValue(AzureBlobFileListSource); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/BuildDocumentModelRequest.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/BuildDocumentModelRequest.cs new file mode 100644 index 000000000000..67f8f8a7eac8 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/BuildDocumentModelRequest.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// Request body to build a new custom document model. + public partial class BuildDocumentModelRequest + { + /// Initializes a new instance of BuildDocumentModelRequest. + /// Unique document model name. + /// Custom document model build mode. + /// is null. + public BuildDocumentModelRequest(string modelId, DocumentBuildMode buildMode) + { + Argument.AssertNotNull(modelId, nameof(modelId)); + + ModelId = modelId; + BuildMode = buildMode; + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of BuildDocumentModelRequest. + /// Unique document model name. + /// Document model description. + /// Custom document model build mode. + /// + /// Azure Blob Storage location containing the training data. Either + /// azureBlobSource or azureBlobFileListSource must be specified. + /// + /// + /// Azure Blob Storage file list specifying the training data. Either + /// azureBlobSource or azureBlobFileListSource must be specified. + /// + /// List of key-value tag attributes associated with the document model. + internal BuildDocumentModelRequest(string modelId, string description, DocumentBuildMode buildMode, AzureBlobContentSource azureBlobSource, AzureBlobFileListContentSource azureBlobFileListSource, IDictionary tags) + { + ModelId = modelId; + Description = description; + BuildMode = buildMode; + AzureBlobSource = azureBlobSource; + AzureBlobFileListSource = azureBlobFileListSource; + Tags = tags; + } + + /// Unique document model name. + public string ModelId { get; } + /// Document model description. + public string Description { get; set; } + /// Custom document model build mode. + public DocumentBuildMode BuildMode { get; } + /// + /// Azure Blob Storage location containing the training data. Either + /// azureBlobSource or azureBlobFileListSource must be specified. + /// + public AzureBlobContentSource AzureBlobSource { get; set; } + /// + /// Azure Blob Storage file list specifying the training data. Either + /// azureBlobSource or azureBlobFileListSource must be specified. + /// + public AzureBlobFileListContentSource AzureBlobFileListSource { get; set; } + /// List of key-value tag attributes associated with the document model. + public IDictionary Tags { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexBuildOperationDetails.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexBuildOperationDetails.Serialization.cs new file mode 100644 index 000000000000..944e58948351 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexBuildOperationDetails.Serialization.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class ChatIndexBuildOperationDetails + { + internal static ChatIndexBuildOperationDetails DeserializeChatIndexBuildOperationDetails(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional result = default; + Guid operationId = default; + OperationStatus status = default; + Optional percentCompleted = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + OperationKind kind = default; + Uri resourceLocation = default; + Optional apiVersion = default; + Optional> tags = default; + Optional error = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("result"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + result = ChatIndexDetails.DeserializeChatIndexDetails(property.Value); + continue; + } + if (property.NameEquals("operationId"u8)) + { + operationId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new OperationStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("percentCompleted"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + percentCompleted = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("kind"u8)) + { + kind = new OperationKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("resourceLocation"u8)) + { + resourceLocation = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = DocumentIntelligenceError.DeserializeDocumentIntelligenceError(property.Value); + continue; + } + } + return new ChatIndexBuildOperationDetails(operationId, status, Optional.ToNullable(percentCompleted), createdDateTime, lastUpdatedDateTime, kind, resourceLocation, apiVersion.Value, Optional.ToDictionary(tags), error.Value, result.Value); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new ChatIndexBuildOperationDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeChatIndexBuildOperationDetails(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexBuildOperationDetails.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexBuildOperationDetails.cs new file mode 100644 index 000000000000..709e818e6678 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexBuildOperationDetails.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// Get Operation response object. + public partial class ChatIndexBuildOperationDetails : OperationDetails + { + /// Initializes a new instance of ChatIndexBuildOperationDetails. + /// Operation status. + /// Date and time (UTC) when the operation was created. + /// Date and time (UTC) when the status was last updated. + /// URL of the resource targeted by this operation. + /// is null. + internal ChatIndexBuildOperationDetails(OperationStatus status, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, Uri resourceLocation) : base(status, createdDateTime, lastUpdatedDateTime, resourceLocation) + { + Argument.AssertNotNull(resourceLocation, nameof(resourceLocation)); + + Kind = OperationKind.ChatBuild; + } + + /// Initializes a new instance of ChatIndexBuildOperationDetails. + /// Operation ID. + /// Operation status. + /// Operation progress (0-100). + /// Date and time (UTC) when the operation was created. + /// Date and time (UTC) when the status was last updated. + /// Type of operation. + /// URL of the resource targeted by this operation. + /// API version used to create this operation. + /// List of key-value tag attributes associated with the document model. + /// Encountered error. + /// Operation result upon success. + internal ChatIndexBuildOperationDetails(Guid operationId, OperationStatus status, int? percentCompleted, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, OperationKind kind, Uri resourceLocation, string apiVersion, IReadOnlyDictionary tags, DocumentIntelligenceError error, ChatIndexDetails result) : base(operationId, status, percentCompleted, createdDateTime, lastUpdatedDateTime, kind, resourceLocation, apiVersion, tags, error) + { + Result = result; + } + + /// Operation result upon success. + public ChatIndexDetails Result { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexDetails.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexDetails.Serialization.cs new file mode 100644 index 000000000000..289c6b61164f --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexDetails.Serialization.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class ChatIndexDetails + { + internal static ChatIndexDetails DeserializeChatIndexDetails(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string chatId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset expirationDateTime = default; + string apiVersion = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("chatId"u8)) + { + chatId = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("expirationDateTime"u8)) + { + expirationDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + } + return new ChatIndexDetails(chatId, createdDateTime, expirationDateTime, apiVersion); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ChatIndexDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeChatIndexDetails(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexDetails.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexDetails.cs new file mode 100644 index 000000000000..25556d2ecbc3 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexDetails.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// Detailed chat index info. + public partial class ChatIndexDetails : ChatIndexSummary + { + /// Initializes a new instance of ChatIndexDetails. + /// Chat index ID. + /// Date and time (UTC) when the index was created. + /// Date and time (UTC) when the index will expire. + /// API version used to create this index. + /// or is null. + internal ChatIndexDetails(string chatId, DateTimeOffset createdDateTime, DateTimeOffset expirationDateTime, string apiVersion) : base(chatId, createdDateTime, expirationDateTime, apiVersion) + { + Argument.AssertNotNull(chatId, nameof(chatId)); + Argument.AssertNotNull(apiVersion, nameof(apiVersion)); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexSummary.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexSummary.cs new file mode 100644 index 000000000000..663c1a5ddd31 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexSummary.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// Chat index info. + public partial class ChatIndexSummary + { + /// Initializes a new instance of ChatIndexSummary. + /// Chat index ID. + /// Date and time (UTC) when the index was created. + /// Date and time (UTC) when the index will expire. + /// API version used to create this index. + /// or is null. + internal ChatIndexSummary(string chatId, DateTimeOffset createdDateTime, DateTimeOffset expirationDateTime, string apiVersion) + { + Argument.AssertNotNull(chatId, nameof(chatId)); + Argument.AssertNotNull(apiVersion, nameof(apiVersion)); + + ChatId = chatId; + CreatedDateTime = createdDateTime; + ExpirationDateTime = expirationDateTime; + ApiVersion = apiVersion; + } + + /// Chat index ID. + public string ChatId { get; } + /// Date and time (UTC) when the index was created. + public DateTimeOffset CreatedDateTime { get; } + /// Date and time (UTC) when the index will expire. + public DateTimeOffset ExpirationDateTime { get; } + /// API version used to create this index. + public string ApiVersion { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ClassifierDocumentTypeDetails.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ClassifierDocumentTypeDetails.Serialization.cs new file mode 100644 index 000000000000..1b6abb0992ef --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ClassifierDocumentTypeDetails.Serialization.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class ClassifierDocumentTypeDetails : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(SourceKind)) + { + writer.WritePropertyName("sourceKind"u8); + writer.WriteStringValue(SourceKind.Value.ToString()); + } + if (Optional.IsDefined(AzureBlobSource)) + { + writer.WritePropertyName("azureBlobSource"u8); + writer.WriteObjectValue(AzureBlobSource); + } + if (Optional.IsDefined(AzureBlobFileListSource)) + { + writer.WritePropertyName("azureBlobFileListSource"u8); + writer.WriteObjectValue(AzureBlobFileListSource); + } + writer.WriteEndObject(); + } + + internal static ClassifierDocumentTypeDetails DeserializeClassifierDocumentTypeDetails(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional sourceKind = default; + Optional azureBlobSource = default; + Optional azureBlobFileListSource = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sourceKind"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceKind = new ContentSourceKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("azureBlobSource"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + azureBlobSource = AzureBlobContentSource.DeserializeAzureBlobContentSource(property.Value); + continue; + } + if (property.NameEquals("azureBlobFileListSource"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + azureBlobFileListSource = AzureBlobFileListContentSource.DeserializeAzureBlobFileListContentSource(property.Value); + continue; + } + } + return new ClassifierDocumentTypeDetails(Optional.ToNullable(sourceKind), azureBlobSource.Value, azureBlobFileListSource.Value); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ClassifierDocumentTypeDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeClassifierDocumentTypeDetails(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ClassifierDocumentTypeDetails.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ClassifierDocumentTypeDetails.cs new file mode 100644 index 000000000000..2bde45f7aa09 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ClassifierDocumentTypeDetails.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.AI.DocumentIntelligence +{ + /// Classifier document type info. + public partial class ClassifierDocumentTypeDetails + { + /// Initializes a new instance of ClassifierDocumentTypeDetails. + public ClassifierDocumentTypeDetails() + { + } + + /// Initializes a new instance of ClassifierDocumentTypeDetails. + /// Type of training data source. + /// + /// Azure Blob Storage location containing the training data for a classifier + /// document type. Either azureBlobSource or azureBlobFileListSource must be + /// specified. + /// + /// + /// Azure Blob Storage file list specifying the training data for a classifier + /// document type. Either azureBlobSource or azureBlobFileListSource must be + /// specified. + /// + internal ClassifierDocumentTypeDetails(ContentSourceKind? sourceKind, AzureBlobContentSource azureBlobSource, AzureBlobFileListContentSource azureBlobFileListSource) + { + SourceKind = sourceKind; + AzureBlobSource = azureBlobSource; + AzureBlobFileListSource = azureBlobFileListSource; + } + + /// Type of training data source. + public ContentSourceKind? SourceKind { get; set; } + /// + /// Azure Blob Storage location containing the training data for a classifier + /// document type. Either azureBlobSource or azureBlobFileListSource must be + /// specified. + /// + public AzureBlobContentSource AzureBlobSource { get; set; } + /// + /// Azure Blob Storage file list specifying the training data for a classifier + /// document type. Either azureBlobSource or azureBlobFileListSource must be + /// specified. + /// + public AzureBlobFileListContentSource AzureBlobFileListSource { get; set; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ClassifyDocumentRequest.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ClassifyDocumentRequest.Serialization.cs new file mode 100644 index 000000000000..7876238b122f --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ClassifyDocumentRequest.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class ClassifyDocumentRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(UrlSource)) + { + writer.WritePropertyName("urlSource"u8); + writer.WriteStringValue(UrlSource.AbsoluteUri); + } + if (Optional.IsDefined(Base64Source)) + { + writer.WritePropertyName("base64Source"u8); + writer.WriteBase64StringValue(Base64Source.ToArray(), "D"); + } + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ClassifyDocumentRequest.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ClassifyDocumentRequest.cs new file mode 100644 index 000000000000..f82e8b8d9d46 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ClassifyDocumentRequest.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.AI.DocumentIntelligence +{ + /// Document classification parameters. + public partial class ClassifyDocumentRequest + { + /// Initializes a new instance of ClassifyDocumentRequest. + public ClassifyDocumentRequest() + { + } + + /// Initializes a new instance of ClassifyDocumentRequest. + /// Document URL to classify. Either urlSource or base64Source must be specified. + /// + /// Base64 encoding of the document to classify. Either urlSource or base64Source + /// must be specified. + /// + internal ClassifyDocumentRequest(Uri urlSource, BinaryData base64Source) + { + UrlSource = urlSource; + Base64Source = base64Source; + } + + /// Document URL to classify. Either urlSource or base64Source must be specified. + public Uri UrlSource { get; set; } + /// + /// Base64 encoding of the document to classify. Either urlSource or base64Source + /// must be specified. + /// + /// To assign a byte[] to this property use . + /// The byte[] will be serialized to a Base64 encoded string. + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromBytes(new byte[] { 1, 2, 3 }) + /// Creates a payload of "AQID". + /// + /// + /// + /// + public BinaryData Base64Source { get; set; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ComponentDocumentModelDetails.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ComponentDocumentModelDetails.Serialization.cs new file mode 100644 index 000000000000..9c83f38c8022 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ComponentDocumentModelDetails.Serialization.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class ComponentDocumentModelDetails : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("modelId"u8); + writer.WriteStringValue(ModelId); + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ComponentDocumentModelDetails.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ComponentDocumentModelDetails.cs new file mode 100644 index 000000000000..b4c59df0440c --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ComponentDocumentModelDetails.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// A component of a composed document model. + public partial class ComponentDocumentModelDetails + { + /// Initializes a new instance of ComponentDocumentModelDetails. + /// Unique document model name. + /// is null. + public ComponentDocumentModelDetails(string modelId) + { + Argument.AssertNotNull(modelId, nameof(modelId)); + + ModelId = modelId; + } + + /// Unique document model name. + public string ModelId { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ComposeDocumentModelRequest.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ComposeDocumentModelRequest.Serialization.cs new file mode 100644 index 000000000000..63159a2eb106 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ComposeDocumentModelRequest.Serialization.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class ComposeDocumentModelRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("modelId"u8); + writer.WriteStringValue(ModelId); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + writer.WritePropertyName("componentModels"u8); + writer.WriteStartArray(); + foreach (var item in ComponentModels) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ComposeDocumentModelRequest.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ComposeDocumentModelRequest.cs new file mode 100644 index 000000000000..bafe06c52c84 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ComposeDocumentModelRequest.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// Request body to create a composed document model from component document models. + public partial class ComposeDocumentModelRequest + { + /// Initializes a new instance of ComposeDocumentModelRequest. + /// Unique document model name. + /// List of component document models to compose. + /// or is null. + public ComposeDocumentModelRequest(string modelId, IEnumerable componentModels) + { + Argument.AssertNotNull(modelId, nameof(modelId)); + Argument.AssertNotNull(componentModels, nameof(componentModels)); + + ModelId = modelId; + ComponentModels = componentModels.ToList(); + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of ComposeDocumentModelRequest. + /// Unique document model name. + /// Document model description. + /// List of component document models to compose. + /// List of key-value tag attributes associated with the document model. + internal ComposeDocumentModelRequest(string modelId, string description, IList componentModels, IDictionary tags) + { + ModelId = modelId; + Description = description; + ComponentModels = componentModels; + Tags = tags; + } + + /// Unique document model name. + public string ModelId { get; } + /// Document model description. + public string Description { get; set; } + /// List of component document models to compose. + public IList ComponentModels { get; } + /// List of key-value tag attributes associated with the document model. + public IDictionary Tags { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ContentFormat.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ContentFormat.cs new file mode 100644 index 000000000000..21477a866134 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ContentFormat.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.DocumentIntelligence +{ + /// Format of the content in analyzed result. + public readonly partial struct ContentFormat : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ContentFormat(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TextValue = "text"; + private const string MarkdownValue = "markdown"; + + /// Plain text representation of the document content without any formatting. + public static ContentFormat Text { get; } = new ContentFormat(TextValue); + /// + /// Markdown representation of the document content with section headings, tables, + /// etc. + /// + public static ContentFormat Markdown { get; } = new ContentFormat(MarkdownValue); + /// Determines if two values are the same. + public static bool operator ==(ContentFormat left, ContentFormat right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ContentFormat left, ContentFormat right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ContentFormat(string value) => new ContentFormat(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ContentFormat other && Equals(other); + /// + public bool Equals(ContentFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ContentSourceKind.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ContentSourceKind.cs new file mode 100644 index 000000000000..219e60abd79c --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ContentSourceKind.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.DocumentIntelligence +{ + /// Type of content source. + public readonly partial struct ContentSourceKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ContentSourceKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UrlValue = "url"; + private const string Base64Value = "base64"; + private const string AzureBlobValue = "azureBlob"; + private const string AzureBlobFileListValue = "azureBlobFileList"; + + /// Content at a specific URL. + public static ContentSourceKind Url { get; } = new ContentSourceKind(UrlValue); + /// Content represented via Base64 encoding. + public static ContentSourceKind Base64 { get; } = new ContentSourceKind(Base64Value); + /// Files in a path within an Azure Blob Storage container. + public static ContentSourceKind AzureBlob { get; } = new ContentSourceKind(AzureBlobValue); + /// A file list specifying individual files in an Azure Blob Storage container. + public static ContentSourceKind AzureBlobFileList { get; } = new ContentSourceKind(AzureBlobFileListValue); + /// Determines if two values are the same. + public static bool operator ==(ContentSourceKind left, ContentSourceKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ContentSourceKind left, ContentSourceKind right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ContentSourceKind(string value) => new ContentSourceKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ContentSourceKind other && Equals(other); + /// + public bool Equals(ContentSourceKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/CopyAuthorization.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/CopyAuthorization.Serialization.cs new file mode 100644 index 000000000000..441b334c4b10 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/CopyAuthorization.Serialization.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class CopyAuthorization : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("targetResourceId"u8); + writer.WriteStringValue(TargetResourceId); + writer.WritePropertyName("targetResourceRegion"u8); + writer.WriteStringValue(TargetResourceRegion); + writer.WritePropertyName("targetModelId"u8); + writer.WriteStringValue(TargetModelId); + writer.WritePropertyName("targetModelLocation"u8); + writer.WriteStringValue(TargetModelLocation.AbsoluteUri); + writer.WritePropertyName("accessToken"u8); + writer.WriteStringValue(AccessToken); + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime, "O"); + writer.WriteEndObject(); + } + + internal static CopyAuthorization DeserializeCopyAuthorization(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string targetResourceId = default; + string targetResourceRegion = default; + string targetModelId = default; + Uri targetModelLocation = default; + string accessToken = default; + DateTimeOffset expirationDateTime = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("targetResourceId"u8)) + { + targetResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetResourceRegion"u8)) + { + targetResourceRegion = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetModelId"u8)) + { + targetModelId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetModelLocation"u8)) + { + targetModelLocation = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("accessToken"u8)) + { + accessToken = property.Value.GetString(); + continue; + } + if (property.NameEquals("expirationDateTime"u8)) + { + expirationDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + } + return new CopyAuthorization(targetResourceId, targetResourceRegion, targetModelId, targetModelLocation, accessToken, expirationDateTime); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static CopyAuthorization FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCopyAuthorization(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/CopyAuthorization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/CopyAuthorization.cs new file mode 100644 index 000000000000..b7e55095ed67 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/CopyAuthorization.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// + /// Authorization to copy a document model to the specified target resource and + /// modelId. + /// + public partial class CopyAuthorization + { + /// Initializes a new instance of CopyAuthorization. + /// ID of the target Azure resource where the document model should be copied to. + /// + /// Location of the target Azure resource where the document model should be copied + /// to. + /// + /// Identifier of the target document model. + /// URL of the copied document model in the target account. + /// Token used to authorize the request. + /// Date/time when the access token expires. + /// , , , or is null. + public CopyAuthorization(string targetResourceId, string targetResourceRegion, string targetModelId, Uri targetModelLocation, string accessToken, DateTimeOffset expirationDateTime) + { + Argument.AssertNotNull(targetResourceId, nameof(targetResourceId)); + Argument.AssertNotNull(targetResourceRegion, nameof(targetResourceRegion)); + Argument.AssertNotNull(targetModelId, nameof(targetModelId)); + Argument.AssertNotNull(targetModelLocation, nameof(targetModelLocation)); + Argument.AssertNotNull(accessToken, nameof(accessToken)); + + TargetResourceId = targetResourceId; + TargetResourceRegion = targetResourceRegion; + TargetModelId = targetModelId; + TargetModelLocation = targetModelLocation; + AccessToken = accessToken; + ExpirationDateTime = expirationDateTime; + } + + /// ID of the target Azure resource where the document model should be copied to. + public string TargetResourceId { get; set; } + /// + /// Location of the target Azure resource where the document model should be copied + /// to. + /// + public string TargetResourceRegion { get; set; } + /// Identifier of the target document model. + public string TargetModelId { get; set; } + /// URL of the copied document model in the target account. + public Uri TargetModelLocation { get; set; } + /// Token used to authorize the request. + public string AccessToken { get; set; } + /// Date/time when the access token expires. + public DateTimeOffset ExpirationDateTime { get; set; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/CurrencyValue.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/CurrencyValue.cs new file mode 100644 index 000000000000..314bda9ec479 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/CurrencyValue.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.AI.DocumentIntelligence +{ + /// Currency field value. + public partial class CurrencyValue + { + /// Initializes a new instance of CurrencyValue. + /// Currency amount. + internal CurrencyValue(double amount) + { + Amount = amount; + } + + /// Initializes a new instance of CurrencyValue. + /// Currency amount. + /// Currency symbol label, if any. + /// Resolved currency code (ISO 4217), if any. + internal CurrencyValue(double amount, string currencySymbol, string currencyCode) + { + Amount = amount; + CurrencySymbol = currencySymbol; + CurrencyCode = currencyCode; + } + + /// Currency amount. + public double Amount { get; } + /// Currency symbol label, if any. + public string CurrencySymbol { get; } + /// Resolved currency code (ISO 4217), if any. + public string CurrencyCode { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/CustomDocumentModelsDetails.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/CustomDocumentModelsDetails.Serialization.cs new file mode 100644 index 000000000000..5f1e703991bf --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/CustomDocumentModelsDetails.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class CustomDocumentModelsDetails + { + internal static CustomDocumentModelsDetails DeserializeCustomDocumentModelsDetails(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int count = default; + int limit = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("count"u8)) + { + count = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("limit"u8)) + { + limit = property.Value.GetInt32(); + continue; + } + } + return new CustomDocumentModelsDetails(count, limit); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static CustomDocumentModelsDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCustomDocumentModelsDetails(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/CustomDocumentModelsDetails.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/CustomDocumentModelsDetails.cs new file mode 100644 index 000000000000..79d111b76ffc --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/CustomDocumentModelsDetails.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.AI.DocumentIntelligence +{ + /// Details regarding custom document models. + public partial class CustomDocumentModelsDetails + { + /// Initializes a new instance of CustomDocumentModelsDetails. + /// Number of custom document models in the current resource. + /// Maximum number of custom document models supported in the current resource. + internal CustomDocumentModelsDetails(int count, int limit) + { + Count = count; + Limit = limit; + } + + /// Number of custom document models in the current resource. + public int Count { get; } + /// Maximum number of custom document models supported in the current resource. + public int Limit { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/Docs/DocumentAnalysisClient.xml b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/Docs/DocumentAnalysisClient.xml new file mode 100644 index 000000000000..c6b1acc345b8 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/Docs/DocumentAnalysisClient.xml @@ -0,0 +1,1063 @@ + + + + + +This sample shows how to call AnalyzeDocumentAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + +Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, ""); +AnalyzeResult responseData = operation.Value; +]]> +This sample shows how to call AnalyzeDocumentAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + +AnalyzeDocumentRequest analyzeRequest = new AnalyzeDocumentRequest +{ + UrlSource = new Uri("http://localhost:3000"), + Base64Source = BinaryData.FromObjectAsJson(new object()), +}; +Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "", analyzeRequest: analyzeRequest, pages: "", locale: "", stringIndexType: StringIndexType.TextElements, features: new DocumentAnalysisFeature[] { DocumentAnalysisFeature.OcrHighResolution }, queryFields: new string[] { "" }, outputContentFormat: ContentFormat.Text); +AnalyzeResult responseData = operation.Value; +]]> + + + +This sample shows how to call AnalyzeDocument. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + +Operation operation = client.AnalyzeDocument(WaitUntil.Completed, ""); +AnalyzeResult responseData = operation.Value; +]]> +This sample shows how to call AnalyzeDocument with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + +AnalyzeDocumentRequest analyzeRequest = new AnalyzeDocumentRequest +{ + UrlSource = new Uri("http://localhost:3000"), + Base64Source = BinaryData.FromObjectAsJson(new object()), +}; +Operation operation = client.AnalyzeDocument(WaitUntil.Completed, "", analyzeRequest: analyzeRequest, pages: "", locale: "", stringIndexType: StringIndexType.TextElements, features: new DocumentAnalysisFeature[] { DocumentAnalysisFeature.OcrHighResolution }, queryFields: new string[] { "" }, outputContentFormat: ContentFormat.Text); +AnalyzeResult responseData = operation.Value; +]]> + + + +This sample shows how to call AnalyzeDocumentAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + +using RequestContent content = null; +Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("stringIndexType").ToString()); +Console.WriteLine(result.GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +]]> +This sample shows how to call AnalyzeDocumentAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + urlSource = "http://localhost:3000", + base64Source = new object(), +}); +Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "", content, pages: "", locale: "", stringIndexType: "textElements", features: new DocumentAnalysisFeature[] { DocumentAnalysisFeature.OcrHighResolution }, queryFields: new string[] { "" }, outputContentFormat: "text"); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("stringIndexType").ToString()); +Console.WriteLine(result.GetProperty("contentFormat").ToString()); +Console.WriteLine(result.GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("angle").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("width").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("height").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("role").ToString()); +Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("rowCount").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("columnCount").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowIndex").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnIndex").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowSpan").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnSpan").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("level").ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("sections")[0].GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("isHandwritten").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("similarFontFamily").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontStyle").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontWeight").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("color").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("backgroundColor").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("languages")[0].GetProperty("locale").ToString()); +Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("languages")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("docType").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueString").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueDate").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueTime").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valuePhoneNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueInteger").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSelectionMark").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSignature").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCountryRegion").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueString").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueDate").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueTime").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valuePhoneNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueInteger").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionMark").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSignature").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCountryRegion").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("amount").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("houseNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("poBox").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("road").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("city").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("postalCode").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("countryRegion").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("streetAddress").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("suburb").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("house").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("level").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueBoolean").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueBoolean").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("confidence").ToString()); +]]> + + + +This sample shows how to call AnalyzeDocument and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + +using RequestContent content = null; +Operation operation = client.AnalyzeDocument(WaitUntil.Completed, "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("stringIndexType").ToString()); +Console.WriteLine(result.GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +]]> +This sample shows how to call AnalyzeDocument with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + urlSource = "http://localhost:3000", + base64Source = new object(), +}); +Operation operation = client.AnalyzeDocument(WaitUntil.Completed, "", content, pages: "", locale: "", stringIndexType: "textElements", features: new DocumentAnalysisFeature[] { DocumentAnalysisFeature.OcrHighResolution }, queryFields: new string[] { "" }, outputContentFormat: "text"); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("stringIndexType").ToString()); +Console.WriteLine(result.GetProperty("contentFormat").ToString()); +Console.WriteLine(result.GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("angle").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("width").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("height").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("role").ToString()); +Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("rowCount").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("columnCount").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowIndex").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnIndex").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowSpan").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnSpan").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("level").ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("sections")[0].GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("isHandwritten").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("similarFontFamily").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontStyle").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontWeight").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("color").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("backgroundColor").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("languages")[0].GetProperty("locale").ToString()); +Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("languages")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("docType").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueString").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueDate").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueTime").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valuePhoneNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueInteger").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSelectionMark").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSignature").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCountryRegion").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueString").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueDate").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueTime").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valuePhoneNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueInteger").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionMark").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSignature").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCountryRegion").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("amount").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("houseNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("poBox").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("road").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("city").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("postalCode").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("countryRegion").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("streetAddress").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("suburb").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("house").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("level").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueBoolean").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueBoolean").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("confidence").ToString()); +]]> + + + +This sample shows how to call ClassifyDocumentAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + +ClassifyDocumentRequest classifyRequest = new ClassifyDocumentRequest(); +Operation operation = await client.ClassifyDocumentAsync(WaitUntil.Completed, "", classifyRequest); +AnalyzeResult responseData = operation.Value; +]]> +This sample shows how to call ClassifyDocumentAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + +ClassifyDocumentRequest classifyRequest = new ClassifyDocumentRequest +{ + UrlSource = new Uri("http://localhost:3000"), + Base64Source = BinaryData.FromObjectAsJson(new object()), +}; +Operation operation = await client.ClassifyDocumentAsync(WaitUntil.Completed, "", classifyRequest, stringIndexType: StringIndexType.TextElements, split: SplitMode.Auto); +AnalyzeResult responseData = operation.Value; +]]> + + + +This sample shows how to call ClassifyDocument. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + +ClassifyDocumentRequest classifyRequest = new ClassifyDocumentRequest(); +Operation operation = client.ClassifyDocument(WaitUntil.Completed, "", classifyRequest); +AnalyzeResult responseData = operation.Value; +]]> +This sample shows how to call ClassifyDocument with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + +ClassifyDocumentRequest classifyRequest = new ClassifyDocumentRequest +{ + UrlSource = new Uri("http://localhost:3000"), + Base64Source = BinaryData.FromObjectAsJson(new object()), +}; +Operation operation = client.ClassifyDocument(WaitUntil.Completed, "", classifyRequest, stringIndexType: StringIndexType.TextElements, split: SplitMode.Auto); +AnalyzeResult responseData = operation.Value; +]]> + + + +This sample shows how to call ClassifyDocumentAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new object()); +Operation operation = await client.ClassifyDocumentAsync(WaitUntil.Completed, "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("stringIndexType").ToString()); +Console.WriteLine(result.GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +]]> +This sample shows how to call ClassifyDocumentAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + urlSource = "http://localhost:3000", + base64Source = new object(), +}); +Operation operation = await client.ClassifyDocumentAsync(WaitUntil.Completed, "", content, stringIndexType: "textElements", split: "auto"); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("stringIndexType").ToString()); +Console.WriteLine(result.GetProperty("contentFormat").ToString()); +Console.WriteLine(result.GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("angle").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("width").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("height").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("role").ToString()); +Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("rowCount").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("columnCount").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowIndex").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnIndex").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowSpan").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnSpan").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("level").ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("sections")[0].GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("isHandwritten").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("similarFontFamily").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontStyle").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontWeight").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("color").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("backgroundColor").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("languages")[0].GetProperty("locale").ToString()); +Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("languages")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("docType").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueString").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueDate").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueTime").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valuePhoneNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueInteger").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSelectionMark").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSignature").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCountryRegion").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueString").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueDate").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueTime").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valuePhoneNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueInteger").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionMark").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSignature").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCountryRegion").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("amount").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("houseNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("poBox").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("road").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("city").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("postalCode").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("countryRegion").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("streetAddress").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("suburb").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("house").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("level").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueBoolean").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueBoolean").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("confidence").ToString()); +]]> + + + +This sample shows how to call ClassifyDocument and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new object()); +Operation operation = client.ClassifyDocument(WaitUntil.Completed, "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("stringIndexType").ToString()); +Console.WriteLine(result.GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +]]> +This sample shows how to call ClassifyDocument with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + urlSource = "http://localhost:3000", + base64Source = new object(), +}); +Operation operation = client.ClassifyDocument(WaitUntil.Completed, "", content, stringIndexType: "textElements", split: "auto"); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("stringIndexType").ToString()); +Console.WriteLine(result.GetProperty("contentFormat").ToString()); +Console.WriteLine(result.GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("angle").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("width").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("height").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("role").ToString()); +Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("rowCount").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("columnCount").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowIndex").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnIndex").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowSpan").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnSpan").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("level").ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("sections")[0].GetProperty("elements")[0].ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("isHandwritten").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("similarFontFamily").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontStyle").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontWeight").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("color").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("backgroundColor").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("styles")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("languages")[0].GetProperty("locale").ToString()); +Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("languages")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("docType").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueString").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueDate").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueTime").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valuePhoneNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueInteger").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSelectionMark").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSignature").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCountryRegion").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueString").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueDate").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueTime").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valuePhoneNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueInteger").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionMark").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSignature").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCountryRegion").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("amount").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("houseNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("poBox").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("road").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("city").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("postalCode").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("countryRegion").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("streetAddress").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("suburb").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("house").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("level").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueBoolean").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueBoolean").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("content").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("documents")[0].GetProperty("confidence").ToString()); +]]> + + + \ No newline at end of file diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/Docs/DocumentModelAdministrationClient.xml b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/Docs/DocumentModelAdministrationClient.xml new file mode 100644 index 000000000000..4f1b593fe761 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/Docs/DocumentModelAdministrationClient.xml @@ -0,0 +1,1915 @@ + + + + + +This sample shows how to call AuthorizeModelCopyAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +AuthorizeCopyRequest authorizeCopyRequest = new AuthorizeCopyRequest(""); +Response response = await client.AuthorizeModelCopyAsync(authorizeCopyRequest); +]]> +This sample shows how to call AuthorizeModelCopyAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +AuthorizeCopyRequest authorizeCopyRequest = new AuthorizeCopyRequest("") +{ + Description = "", + Tags = + { + ["key"] = "" + }, +}; +Response response = await client.AuthorizeModelCopyAsync(authorizeCopyRequest); +]]> + + + +This sample shows how to call AuthorizeModelCopy. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +AuthorizeCopyRequest authorizeCopyRequest = new AuthorizeCopyRequest(""); +Response response = client.AuthorizeModelCopy(authorizeCopyRequest); +]]> +This sample shows how to call AuthorizeModelCopy with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +AuthorizeCopyRequest authorizeCopyRequest = new AuthorizeCopyRequest("") +{ + Description = "", + Tags = + { + ["key"] = "" + }, +}; +Response response = client.AuthorizeModelCopy(authorizeCopyRequest); +]]> + + + +This sample shows how to call AuthorizeModelCopyAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + modelId = "", +}); +Response response = await client.AuthorizeModelCopyAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("targetResourceId").ToString()); +Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); +Console.WriteLine(result.GetProperty("targetModelId").ToString()); +Console.WriteLine(result.GetProperty("targetModelLocation").ToString()); +Console.WriteLine(result.GetProperty("accessToken").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +]]> +This sample shows how to call AuthorizeModelCopyAsync with all request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + modelId = "", + description = "", + tags = new + { + key = "", + }, +}); +Response response = await client.AuthorizeModelCopyAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("targetResourceId").ToString()); +Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); +Console.WriteLine(result.GetProperty("targetModelId").ToString()); +Console.WriteLine(result.GetProperty("targetModelLocation").ToString()); +Console.WriteLine(result.GetProperty("accessToken").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +]]> + + + +This sample shows how to call AuthorizeModelCopy and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + modelId = "", +}); +Response response = client.AuthorizeModelCopy(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("targetResourceId").ToString()); +Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); +Console.WriteLine(result.GetProperty("targetModelId").ToString()); +Console.WriteLine(result.GetProperty("targetModelLocation").ToString()); +Console.WriteLine(result.GetProperty("accessToken").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +]]> +This sample shows how to call AuthorizeModelCopy with all request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + modelId = "", + description = "", + tags = new + { + key = "", + }, +}); +Response response = client.AuthorizeModelCopy(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("targetResourceId").ToString()); +Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); +Console.WriteLine(result.GetProperty("targetModelId").ToString()); +Console.WriteLine(result.GetProperty("targetModelLocation").ToString()); +Console.WriteLine(result.GetProperty("accessToken").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +]]> + + + +This sample shows how to call GetModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = await client.GetModelAsync(""); +]]> +This sample shows how to call GetModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = await client.GetModelAsync(""); +]]> + + + +This sample shows how to call GetModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = client.GetModel(""); +]]> +This sample shows how to call GetModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = client.GetModel(""); +]]> + + + +This sample shows how to call GetModelAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = await client.GetModelAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("buildMode").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +]]> +This sample shows how to call GetModelAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = await client.GetModelAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("buildMode").ToString()); +Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); +Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); +Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); +Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +]]> + + + +This sample shows how to call GetModel and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = client.GetModel("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("buildMode").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +]]> +This sample shows how to call GetModel with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = client.GetModel("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("buildMode").ToString()); +Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); +Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); +Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); +Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +]]> + + + +This sample shows how to call DeleteModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = await client.DeleteModelAsync(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = await client.DeleteModelAsync(""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DeleteModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = client.DeleteModel(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = client.DeleteModel(""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetResourceInfoAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = await client.GetResourceInfoAsync(); +]]> +This sample shows how to call GetResourceInfoAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = await client.GetResourceInfoAsync(); +]]> + + + +This sample shows how to call GetResourceInfo. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = client.GetResourceInfo(); +]]> +This sample shows how to call GetResourceInfo with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = client.GetResourceInfo(); +]]> + + + +This sample shows how to call GetResourceInfoAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = await client.GetResourceInfoAsync(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("customDocumentModels").GetProperty("count").ToString()); +Console.WriteLine(result.GetProperty("customDocumentModels").GetProperty("limit").ToString()); +Console.WriteLine(result.GetProperty("customNeuralDocumentModelBuilds").GetProperty("used").ToString()); +Console.WriteLine(result.GetProperty("customNeuralDocumentModelBuilds").GetProperty("quota").ToString()); +Console.WriteLine(result.GetProperty("customNeuralDocumentModelBuilds").GetProperty("quotaResetDateTime").ToString()); +]]> +This sample shows how to call GetResourceInfoAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = await client.GetResourceInfoAsync(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("customDocumentModels").GetProperty("count").ToString()); +Console.WriteLine(result.GetProperty("customDocumentModels").GetProperty("limit").ToString()); +Console.WriteLine(result.GetProperty("customNeuralDocumentModelBuilds").GetProperty("used").ToString()); +Console.WriteLine(result.GetProperty("customNeuralDocumentModelBuilds").GetProperty("quota").ToString()); +Console.WriteLine(result.GetProperty("customNeuralDocumentModelBuilds").GetProperty("quotaResetDateTime").ToString()); +]]> + + + +This sample shows how to call GetResourceInfo and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = client.GetResourceInfo(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("customDocumentModels").GetProperty("count").ToString()); +Console.WriteLine(result.GetProperty("customDocumentModels").GetProperty("limit").ToString()); +Console.WriteLine(result.GetProperty("customNeuralDocumentModelBuilds").GetProperty("used").ToString()); +Console.WriteLine(result.GetProperty("customNeuralDocumentModelBuilds").GetProperty("quota").ToString()); +Console.WriteLine(result.GetProperty("customNeuralDocumentModelBuilds").GetProperty("quotaResetDateTime").ToString()); +]]> +This sample shows how to call GetResourceInfo with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = client.GetResourceInfo(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("customDocumentModels").GetProperty("count").ToString()); +Console.WriteLine(result.GetProperty("customDocumentModels").GetProperty("limit").ToString()); +Console.WriteLine(result.GetProperty("customNeuralDocumentModelBuilds").GetProperty("used").ToString()); +Console.WriteLine(result.GetProperty("customNeuralDocumentModelBuilds").GetProperty("quota").ToString()); +Console.WriteLine(result.GetProperty("customNeuralDocumentModelBuilds").GetProperty("quotaResetDateTime").ToString()); +]]> + + + +This sample shows how to call GetOperationAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = await client.GetOperationAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); +]]> +This sample shows how to call GetOperationAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = await client.GetOperationAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); +]]> + + + +This sample shows how to call GetOperation. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = client.GetOperation(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); +]]> +This sample shows how to call GetOperation with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = client.GetOperation(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); +]]> + + + +This sample shows how to call GetOperationAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = await client.GetOperationAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("operationId").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("resourceLocation").ToString()); +]]> +This sample shows how to call GetOperationAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = await client.GetOperationAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("operationId").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("percentCompleted").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("resourceLocation").ToString()); +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); +]]> + + + +This sample shows how to call GetOperation and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = client.GetOperation(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("operationId").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("resourceLocation").ToString()); +]]> +This sample shows how to call GetOperation with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = client.GetOperation(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("operationId").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("percentCompleted").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("resourceLocation").ToString()); +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); +]]> + + + +This sample shows how to call GetClassifierAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = await client.GetClassifierAsync(""); +]]> +This sample shows how to call GetClassifierAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = await client.GetClassifierAsync(""); +]]> + + + +This sample shows how to call GetClassifier. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = client.GetClassifier(""); +]]> +This sample shows how to call GetClassifier with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = client.GetClassifier(""); +]]> + + + +This sample shows how to call GetClassifierAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = await client.GetClassifierAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("classifierId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").ToString()); +]]> +This sample shows how to call GetClassifierAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = await client.GetClassifierAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("classifierId").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("sourceKind").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("prefix").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); +]]> + + + +This sample shows how to call GetClassifier and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = client.GetClassifier("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("classifierId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").ToString()); +]]> +This sample shows how to call GetClassifier with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = client.GetClassifier("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("classifierId").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("sourceKind").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("prefix").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); +]]> + + + +This sample shows how to call DeleteClassifierAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = await client.DeleteClassifierAsync(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteClassifierAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = await client.DeleteClassifierAsync(""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DeleteClassifier. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = client.DeleteClassifier(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteClassifier with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +Response response = client.DeleteClassifier(""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetModelsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +await foreach (DocumentModelSummary item in client.GetModelsAsync()) +{ +} +]]> +This sample shows how to call GetModelsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +await foreach (DocumentModelSummary item in client.GetModelsAsync()) +{ +} +]]> + + + +This sample shows how to call GetModels. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +foreach (DocumentModelSummary item in client.GetModels()) +{ +} +]]> +This sample shows how to call GetModels with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +foreach (DocumentModelSummary item in client.GetModels()) +{ +} +]]> + + + +This sample shows how to call GetModelsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +await foreach (BinaryData item in client.GetModelsAsync(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +} +]]> +This sample shows how to call GetModelsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +await foreach (BinaryData item in client.GetModelsAsync(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +} +]]> + + + +This sample shows how to call GetModels and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +foreach (BinaryData item in client.GetModels(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +} +]]> +This sample shows how to call GetModels with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +foreach (BinaryData item in client.GetModels(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +} +]]> + + + +This sample shows how to call GetOperationsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +await foreach (OperationSummary item in client.GetOperationsAsync()) +{ +} +]]> +This sample shows how to call GetOperationsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +await foreach (OperationSummary item in client.GetOperationsAsync()) +{ +} +]]> + + + +This sample shows how to call GetOperations. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +foreach (OperationSummary item in client.GetOperations()) +{ +} +]]> +This sample shows how to call GetOperations with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +foreach (OperationSummary item in client.GetOperations()) +{ +} +]]> + + + +This sample shows how to call GetOperationsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +await foreach (BinaryData item in client.GetOperationsAsync(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("operationId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("resourceLocation").ToString()); +} +]]> +This sample shows how to call GetOperationsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +await foreach (BinaryData item in client.GetOperationsAsync(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("operationId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("percentCompleted").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("resourceLocation").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +} +]]> + + + +This sample shows how to call GetOperations and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +foreach (BinaryData item in client.GetOperations(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("operationId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("resourceLocation").ToString()); +} +]]> +This sample shows how to call GetOperations with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +foreach (BinaryData item in client.GetOperations(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("operationId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("percentCompleted").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("resourceLocation").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +} +]]> + + + +This sample shows how to call GetClassifiersAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +await foreach (DocumentClassifierDetails item in client.GetClassifiersAsync()) +{ +} +]]> +This sample shows how to call GetClassifiersAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +await foreach (DocumentClassifierDetails item in client.GetClassifiersAsync()) +{ +} +]]> + + + +This sample shows how to call GetClassifiers. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +foreach (DocumentClassifierDetails item in client.GetClassifiers()) +{ +} +]]> +This sample shows how to call GetClassifiers with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +foreach (DocumentClassifierDetails item in client.GetClassifiers()) +{ +} +]]> + + + +This sample shows how to call GetClassifiersAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +await foreach (BinaryData item in client.GetClassifiersAsync(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("classifierId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").ToString()); +} +]]> +This sample shows how to call GetClassifiersAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +await foreach (BinaryData item in client.GetClassifiersAsync(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("classifierId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("sourceKind").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("prefix").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); +} +]]> + + + +This sample shows how to call GetClassifiers and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +foreach (BinaryData item in client.GetClassifiers(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("classifierId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").ToString()); +} +]]> +This sample shows how to call GetClassifiers with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +foreach (BinaryData item in client.GetClassifiers(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("classifierId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("sourceKind").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("prefix").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); +} +]]> + + + +This sample shows how to call BuildDocumentAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +BuildDocumentModelRequest buildRequest = new BuildDocumentModelRequest("", DocumentBuildMode.Template); +Operation operation = await client.BuildDocumentAsync(WaitUntil.Completed, buildRequest); +DocumentModelDetails responseData = operation.Value; +]]> +This sample shows how to call BuildDocumentAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +BuildDocumentModelRequest buildRequest = new BuildDocumentModelRequest("", DocumentBuildMode.Template) +{ + Description = "", + AzureBlobSource = new AzureBlobContentSource(new Uri("http://localhost:3000")) + { + Prefix = "", + }, + AzureBlobFileListSource = new AzureBlobFileListContentSource(new Uri("http://localhost:3000"), ""), + Tags = + { + ["key"] = "" + }, +}; +Operation operation = await client.BuildDocumentAsync(WaitUntil.Completed, buildRequest); +DocumentModelDetails responseData = operation.Value; +]]> + + + +This sample shows how to call BuildDocument. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +BuildDocumentModelRequest buildRequest = new BuildDocumentModelRequest("", DocumentBuildMode.Template); +Operation operation = client.BuildDocument(WaitUntil.Completed, buildRequest); +DocumentModelDetails responseData = operation.Value; +]]> +This sample shows how to call BuildDocument with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +BuildDocumentModelRequest buildRequest = new BuildDocumentModelRequest("", DocumentBuildMode.Template) +{ + Description = "", + AzureBlobSource = new AzureBlobContentSource(new Uri("http://localhost:3000")) + { + Prefix = "", + }, + AzureBlobFileListSource = new AzureBlobFileListContentSource(new Uri("http://localhost:3000"), ""), + Tags = + { + ["key"] = "" + }, +}; +Operation operation = client.BuildDocument(WaitUntil.Completed, buildRequest); +DocumentModelDetails responseData = operation.Value; +]]> + + + +This sample shows how to call BuildDocumentAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + modelId = "", + buildMode = "template", +}); +Operation operation = await client.BuildDocumentAsync(WaitUntil.Completed, content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("buildMode").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +]]> +This sample shows how to call BuildDocumentAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + modelId = "", + description = "", + buildMode = "template", + azureBlobSource = new + { + containerUrl = "http://localhost:3000", + prefix = "", + }, + azureBlobFileListSource = new + { + containerUrl = "http://localhost:3000", + fileList = "", + }, + tags = new + { + key = "", + }, +}); +Operation operation = await client.BuildDocumentAsync(WaitUntil.Completed, content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("buildMode").ToString()); +Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); +Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); +Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); +Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +]]> + + + +This sample shows how to call BuildDocument and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + modelId = "", + buildMode = "template", +}); +Operation operation = client.BuildDocument(WaitUntil.Completed, content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("buildMode").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +]]> +This sample shows how to call BuildDocument with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + modelId = "", + description = "", + buildMode = "template", + azureBlobSource = new + { + containerUrl = "http://localhost:3000", + prefix = "", + }, + azureBlobFileListSource = new + { + containerUrl = "http://localhost:3000", + fileList = "", + }, + tags = new + { + key = "", + }, +}); +Operation operation = client.BuildDocument(WaitUntil.Completed, content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("buildMode").ToString()); +Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); +Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); +Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); +Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +]]> + + + +This sample shows how to call ComposeModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +ComposeDocumentModelRequest composeRequest = new ComposeDocumentModelRequest("", new ComponentDocumentModelDetails[] +{ + new ComponentDocumentModelDetails("") +}); +Operation operation = await client.ComposeModelAsync(WaitUntil.Completed, composeRequest); +DocumentModelDetails responseData = operation.Value; +]]> +This sample shows how to call ComposeModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +ComposeDocumentModelRequest composeRequest = new ComposeDocumentModelRequest("", new ComponentDocumentModelDetails[] +{ + new ComponentDocumentModelDetails("") +}) +{ + Description = "", + Tags = + { + ["key"] = "" + }, +}; +Operation operation = await client.ComposeModelAsync(WaitUntil.Completed, composeRequest); +DocumentModelDetails responseData = operation.Value; +]]> + + + +This sample shows how to call ComposeModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +ComposeDocumentModelRequest composeRequest = new ComposeDocumentModelRequest("", new ComponentDocumentModelDetails[] +{ + new ComponentDocumentModelDetails("") +}); +Operation operation = client.ComposeModel(WaitUntil.Completed, composeRequest); +DocumentModelDetails responseData = operation.Value; +]]> +This sample shows how to call ComposeModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +ComposeDocumentModelRequest composeRequest = new ComposeDocumentModelRequest("", new ComponentDocumentModelDetails[] +{ + new ComponentDocumentModelDetails("") +}) +{ + Description = "", + Tags = + { + ["key"] = "" + }, +}; +Operation operation = client.ComposeModel(WaitUntil.Completed, composeRequest); +DocumentModelDetails responseData = operation.Value; +]]> + + + +This sample shows how to call ComposeModelAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + modelId = "", + componentModels = new object[] + { + new + { + modelId = "", + } + }, +}); +Operation operation = await client.ComposeModelAsync(WaitUntil.Completed, content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("buildMode").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +]]> +This sample shows how to call ComposeModelAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + modelId = "", + description = "", + componentModels = new object[] + { + new + { + modelId = "", + } + }, + tags = new + { + key = "", + }, +}); +Operation operation = await client.ComposeModelAsync(WaitUntil.Completed, content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("buildMode").ToString()); +Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); +Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); +Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); +Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +]]> + + + +This sample shows how to call ComposeModel and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + modelId = "", + componentModels = new object[] + { + new + { + modelId = "", + } + }, +}); +Operation operation = client.ComposeModel(WaitUntil.Completed, content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("buildMode").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +]]> +This sample shows how to call ComposeModel with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + modelId = "", + description = "", + componentModels = new object[] + { + new + { + modelId = "", + } + }, + tags = new + { + key = "", + }, +}); +Operation operation = client.ComposeModel(WaitUntil.Completed, content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("buildMode").ToString()); +Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); +Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); +Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); +Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +]]> + + + +This sample shows how to call CopyModelToAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +CopyAuthorization copyToRequest = new CopyAuthorization("", "", "", new Uri("http://localhost:3000"), "", DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); +Operation operation = await client.CopyModelToAsync(WaitUntil.Completed, "", copyToRequest); +DocumentModelDetails responseData = operation.Value; +]]> +This sample shows how to call CopyModelToAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +CopyAuthorization copyToRequest = new CopyAuthorization("", "", "", new Uri("http://localhost:3000"), "", DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); +Operation operation = await client.CopyModelToAsync(WaitUntil.Completed, "", copyToRequest); +DocumentModelDetails responseData = operation.Value; +]]> + + + +This sample shows how to call CopyModelTo. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +CopyAuthorization copyToRequest = new CopyAuthorization("", "", "", new Uri("http://localhost:3000"), "", DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); +Operation operation = client.CopyModelTo(WaitUntil.Completed, "", copyToRequest); +DocumentModelDetails responseData = operation.Value; +]]> +This sample shows how to call CopyModelTo with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +CopyAuthorization copyToRequest = new CopyAuthorization("", "", "", new Uri("http://localhost:3000"), "", DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); +Operation operation = client.CopyModelTo(WaitUntil.Completed, "", copyToRequest); +DocumentModelDetails responseData = operation.Value; +]]> + + + +This sample shows how to call CopyModelToAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + targetResourceId = "", + targetResourceRegion = "", + targetModelId = "", + targetModelLocation = "http://localhost:3000", + accessToken = "", + expirationDateTime = "2022-05-10T14:57:31.2311892-04:00", +}); +Operation operation = await client.CopyModelToAsync(WaitUntil.Completed, "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("buildMode").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +]]> +This sample shows how to call CopyModelToAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + targetResourceId = "", + targetResourceRegion = "", + targetModelId = "", + targetModelLocation = "http://localhost:3000", + accessToken = "", + expirationDateTime = "2022-05-10T14:57:31.2311892-04:00", +}); +Operation operation = await client.CopyModelToAsync(WaitUntil.Completed, "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("buildMode").ToString()); +Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); +Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); +Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); +Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +]]> + + + +This sample shows how to call CopyModelTo and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + targetResourceId = "", + targetResourceRegion = "", + targetModelId = "", + targetModelLocation = "http://localhost:3000", + accessToken = "", + expirationDateTime = "2022-05-10T14:57:31.2311892-04:00", +}); +Operation operation = client.CopyModelTo(WaitUntil.Completed, "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("buildMode").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +]]> +This sample shows how to call CopyModelTo with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + targetResourceId = "", + targetResourceRegion = "", + targetModelId = "", + targetModelLocation = "http://localhost:3000", + accessToken = "", + expirationDateTime = "2022-05-10T14:57:31.2311892-04:00", +}); +Operation operation = client.CopyModelTo(WaitUntil.Completed, "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("buildMode").ToString()); +Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); +Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); +Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); +Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +]]> + + + +This sample shows how to call BuildClassifierAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +BuildDocumentClassifierRequest buildRequest = new BuildDocumentClassifierRequest("", new Dictionary +{ + ["key"] = new ClassifierDocumentTypeDetails() +}); +Operation operation = await client.BuildClassifierAsync(WaitUntil.Completed, buildRequest); +DocumentClassifierDetails responseData = operation.Value; +]]> +This sample shows how to call BuildClassifierAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +BuildDocumentClassifierRequest buildRequest = new BuildDocumentClassifierRequest("", new Dictionary +{ + ["key"] = new ClassifierDocumentTypeDetails + { + SourceKind = ContentSourceKind.Url, + AzureBlobSource = new AzureBlobContentSource(new Uri("http://localhost:3000")) + { + Prefix = "", + }, + AzureBlobFileListSource = new AzureBlobFileListContentSource(new Uri("http://localhost:3000"), ""), + } +}) +{ + Description = "", +}; +Operation operation = await client.BuildClassifierAsync(WaitUntil.Completed, buildRequest); +DocumentClassifierDetails responseData = operation.Value; +]]> + + + +This sample shows how to call BuildClassifier. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +BuildDocumentClassifierRequest buildRequest = new BuildDocumentClassifierRequest("", new Dictionary +{ + ["key"] = new ClassifierDocumentTypeDetails() +}); +Operation operation = client.BuildClassifier(WaitUntil.Completed, buildRequest); +DocumentClassifierDetails responseData = operation.Value; +]]> +This sample shows how to call BuildClassifier with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +BuildDocumentClassifierRequest buildRequest = new BuildDocumentClassifierRequest("", new Dictionary +{ + ["key"] = new ClassifierDocumentTypeDetails + { + SourceKind = ContentSourceKind.Url, + AzureBlobSource = new AzureBlobContentSource(new Uri("http://localhost:3000")) + { + Prefix = "", + }, + AzureBlobFileListSource = new AzureBlobFileListContentSource(new Uri("http://localhost:3000"), ""), + } +}) +{ + Description = "", +}; +Operation operation = client.BuildClassifier(WaitUntil.Completed, buildRequest); +DocumentClassifierDetails responseData = operation.Value; +]]> + + + +This sample shows how to call BuildClassifierAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + classifierId = "", + docTypes = new + { + key = new object(), + }, +}); +Operation operation = await client.BuildClassifierAsync(WaitUntil.Completed, content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("classifierId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").ToString()); +]]> +This sample shows how to call BuildClassifierAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + classifierId = "", + description = "", + docTypes = new + { + key = new + { + sourceKind = "url", + azureBlobSource = new + { + containerUrl = "http://localhost:3000", + prefix = "", + }, + azureBlobFileListSource = new + { + containerUrl = "http://localhost:3000", + fileList = "", + }, + }, + }, +}); +Operation operation = await client.BuildClassifierAsync(WaitUntil.Completed, content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("classifierId").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("sourceKind").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("prefix").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); +]]> + + + +This sample shows how to call BuildClassifier and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + classifierId = "", + docTypes = new + { + key = new object(), + }, +}); +Operation operation = client.BuildClassifier(WaitUntil.Completed, content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("classifierId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").ToString()); +]]> +This sample shows how to call BuildClassifier with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + classifierId = "", + description = "", + docTypes = new + { + key = new + { + sourceKind = "url", + azureBlobSource = new + { + containerUrl = "http://localhost:3000", + prefix = "", + }, + azureBlobFileListSource = new + { + containerUrl = "http://localhost:3000", + fileList = "", + }, + }, + }, +}); +Operation operation = client.BuildClassifier(WaitUntil.Completed, content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("classifierId").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("sourceKind").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("prefix").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); +Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); +]]> + + + \ No newline at end of file diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentAnalysisClient.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentAnalysisClient.cs new file mode 100644 index 000000000000..f080b774f643 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentAnalysisClient.cs @@ -0,0 +1,437 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.AI.DocumentIntelligence +{ + // Data plane generated client. + /// The DocumentAnalysis service client. + public partial class DocumentAnalysisClient + { + private const string AuthorizationHeader = "Ocp-Apim-Subscription-Key"; + private readonly AzureKeyCredential _keyCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of DocumentAnalysisClient for mocking. + protected DocumentAnalysisClient() + { + } + + /// Initializes a new instance of DocumentAnalysisClient. + /// The Document Intelligence service endpoint. + /// A credential used to authenticate to an Azure Service. + /// or is null. + public DocumentAnalysisClient(Uri endpoint, AzureKeyCredential credential) : this(endpoint, credential, new AzureAIDocumentIntelligenceClientOptions()) + { + } + + /// Initializes a new instance of DocumentAnalysisClient. + /// The Document Intelligence service endpoint. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + /// or is null. + public DocumentAnalysisClient(Uri endpoint, AzureKeyCredential credential, AzureAIDocumentIntelligenceClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new AzureAIDocumentIntelligenceClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _keyCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new AzureKeyCredentialPolicy(_keyCredential, AuthorizationHeader) }, new ResponseClassifier()); + _endpoint = endpoint; + _apiVersion = options.Version; + } + + /// Analyzes document with document model. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Unique document model name. + /// Analyze request parameters. + /// List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". + /// + /// Locale hint for text recognition and document analysis. Value may contain only + /// the language code (ex. "en", "fr") or BCP 47 language tag (ex. "en-US"). + /// + /// Method used to compute string offset and length. + /// List of optional analysis features. + /// List of additional fields to extract. Ex. "NumberOfGuests,StoreNumber". + /// Format of the analyze result top-level content. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> AnalyzeDocumentAsync(WaitUntil waitUntil, string modelId, AnalyzeDocumentRequest analyzeRequest = null, string pages = null, string locale = null, StringIndexType? stringIndexType = null, IEnumerable features = null, IEnumerable queryFields = null, ContentFormat? outputContentFormat = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(modelId, nameof(modelId)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = analyzeRequest?.ToRequestContent(); + Operation response = await AnalyzeDocumentAsync(waitUntil, modelId, content, pages, locale, stringIndexType?.ToString(), features, queryFields, outputContentFormat?.ToString(), context).ConfigureAwait(false); + return ProtocolOperationHelpers.Convert(response, AnalyzeResult.FromResponse, ClientDiagnostics, "DocumentAnalysisClient.AnalyzeDocument"); + } + + /// Analyzes document with document model. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Unique document model name. + /// Analyze request parameters. + /// List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". + /// + /// Locale hint for text recognition and document analysis. Value may contain only + /// the language code (ex. "en", "fr") or BCP 47 language tag (ex. "en-US"). + /// + /// Method used to compute string offset and length. + /// List of optional analysis features. + /// List of additional fields to extract. Ex. "NumberOfGuests,StoreNumber". + /// Format of the analyze result top-level content. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Operation AnalyzeDocument(WaitUntil waitUntil, string modelId, AnalyzeDocumentRequest analyzeRequest = null, string pages = null, string locale = null, StringIndexType? stringIndexType = null, IEnumerable features = null, IEnumerable queryFields = null, ContentFormat? outputContentFormat = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(modelId, nameof(modelId)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = analyzeRequest?.ToRequestContent(); + Operation response = AnalyzeDocument(waitUntil, modelId, content, pages, locale, stringIndexType?.ToString(), features, queryFields, outputContentFormat?.ToString(), context); + return ProtocolOperationHelpers.Convert(response, AnalyzeResult.FromResponse, ClientDiagnostics, "DocumentAnalysisClient.AnalyzeDocument"); + } + + /// + /// [Protocol Method] Analyzes document with document model. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Unique document model name. + /// The content to send as the body of the request. + /// List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". + /// + /// Locale hint for text recognition and document analysis. Value may contain only + /// the language code (ex. "en", "fr") or BCP 47 language tag (ex. "en-US"). + /// + /// Method used to compute string offset and length. Allowed values: "textElements" | "unicodeCodePoint" | "utf16CodeUnit". + /// List of optional analysis features. + /// List of additional fields to extract. Ex. "NumberOfGuests,StoreNumber". + /// Format of the analyze result top-level content. Allowed values: "text" | "markdown". + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task> AnalyzeDocumentAsync(WaitUntil waitUntil, string modelId, RequestContent content, string pages = null, string locale = null, string stringIndexType = null, IEnumerable features = null, IEnumerable queryFields = null, string outputContentFormat = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(modelId, nameof(modelId)); + + using var scope = ClientDiagnostics.CreateScope("DocumentAnalysisClient.AnalyzeDocument"); + scope.Start(); + try + { + using HttpMessage message = CreateAnalyzeDocumentRequest(modelId, content, pages, locale, stringIndexType, features, queryFields, outputContentFormat, context); + return await ProtocolOperationHelpers.ProcessMessageAsync(_pipeline, message, ClientDiagnostics, "DocumentAnalysisClient.AnalyzeDocument", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Analyzes document with document model. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Unique document model name. + /// The content to send as the body of the request. + /// List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". + /// + /// Locale hint for text recognition and document analysis. Value may contain only + /// the language code (ex. "en", "fr") or BCP 47 language tag (ex. "en-US"). + /// + /// Method used to compute string offset and length. Allowed values: "textElements" | "unicodeCodePoint" | "utf16CodeUnit". + /// List of optional analysis features. + /// List of additional fields to extract. Ex. "NumberOfGuests,StoreNumber". + /// Format of the analyze result top-level content. Allowed values: "text" | "markdown". + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation AnalyzeDocument(WaitUntil waitUntil, string modelId, RequestContent content, string pages = null, string locale = null, string stringIndexType = null, IEnumerable features = null, IEnumerable queryFields = null, string outputContentFormat = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(modelId, nameof(modelId)); + + using var scope = ClientDiagnostics.CreateScope("DocumentAnalysisClient.AnalyzeDocument"); + scope.Start(); + try + { + using HttpMessage message = CreateAnalyzeDocumentRequest(modelId, content, pages, locale, stringIndexType, features, queryFields, outputContentFormat, context); + return ProtocolOperationHelpers.ProcessMessage(_pipeline, message, ClientDiagnostics, "DocumentAnalysisClient.AnalyzeDocument", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Classifies document with document classifier. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Unique document classifier name. + /// Classify request parameters. + /// Method used to compute string offset and length. + /// Document splitting mode. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> ClassifyDocumentAsync(WaitUntil waitUntil, string classifierId, ClassifyDocumentRequest classifyRequest, StringIndexType? stringIndexType = null, SplitMode? split = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(classifierId, nameof(classifierId)); + Argument.AssertNotNull(classifyRequest, nameof(classifyRequest)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = classifyRequest.ToRequestContent(); + Operation response = await ClassifyDocumentAsync(waitUntil, classifierId, content, stringIndexType?.ToString(), split?.ToString(), context).ConfigureAwait(false); + return ProtocolOperationHelpers.Convert(response, AnalyzeResult.FromResponse, ClientDiagnostics, "DocumentAnalysisClient.ClassifyDocument"); + } + + /// Classifies document with document classifier. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Unique document classifier name. + /// Classify request parameters. + /// Method used to compute string offset and length. + /// Document splitting mode. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Operation ClassifyDocument(WaitUntil waitUntil, string classifierId, ClassifyDocumentRequest classifyRequest, StringIndexType? stringIndexType = null, SplitMode? split = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(classifierId, nameof(classifierId)); + Argument.AssertNotNull(classifyRequest, nameof(classifyRequest)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = classifyRequest.ToRequestContent(); + Operation response = ClassifyDocument(waitUntil, classifierId, content, stringIndexType?.ToString(), split?.ToString(), context); + return ProtocolOperationHelpers.Convert(response, AnalyzeResult.FromResponse, ClientDiagnostics, "DocumentAnalysisClient.ClassifyDocument"); + } + + /// + /// [Protocol Method] Classifies document with document classifier. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Unique document classifier name. + /// The content to send as the body of the request. + /// Method used to compute string offset and length. Allowed values: "textElements" | "unicodeCodePoint" | "utf16CodeUnit". + /// Document splitting mode. Allowed values: "auto" | "none" | "perPage". + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task> ClassifyDocumentAsync(WaitUntil waitUntil, string classifierId, RequestContent content, string stringIndexType = null, string split = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(classifierId, nameof(classifierId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("DocumentAnalysisClient.ClassifyDocument"); + scope.Start(); + try + { + using HttpMessage message = CreateClassifyDocumentRequest(classifierId, content, stringIndexType, split, context); + return await ProtocolOperationHelpers.ProcessMessageAsync(_pipeline, message, ClientDiagnostics, "DocumentAnalysisClient.ClassifyDocument", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Classifies document with document classifier. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Unique document classifier name. + /// The content to send as the body of the request. + /// Method used to compute string offset and length. Allowed values: "textElements" | "unicodeCodePoint" | "utf16CodeUnit". + /// Document splitting mode. Allowed values: "auto" | "none" | "perPage". + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation ClassifyDocument(WaitUntil waitUntil, string classifierId, RequestContent content, string stringIndexType = null, string split = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(classifierId, nameof(classifierId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("DocumentAnalysisClient.ClassifyDocument"); + scope.Start(); + try + { + using HttpMessage message = CreateClassifyDocumentRequest(classifierId, content, stringIndexType, split, context); + return ProtocolOperationHelpers.ProcessMessage(_pipeline, message, ClientDiagnostics, "DocumentAnalysisClient.ClassifyDocument", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + internal HttpMessage CreateAnalyzeDocumentRequest(string modelId, RequestContent content, string pages, string locale, string stringIndexType, IEnumerable features, IEnumerable queryFields, string outputContentFormat, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/documentintelligence", false); + uri.AppendPath("/documentModels/", false); + uri.AppendPath(modelId, true); + uri.AppendPath(":analyze", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (pages != null) + { + uri.AppendQuery("pages", pages, true); + } + if (locale != null) + { + uri.AppendQuery("locale", locale, true); + } + if (stringIndexType != null) + { + uri.AppendQuery("stringIndexType", stringIndexType, true); + } + if (features != null && Optional.IsCollectionDefined(features)) + { + uri.AppendQueryDelimited("features", features, ",", true); + } + if (queryFields != null && Optional.IsCollectionDefined(queryFields)) + { + uri.AppendQueryDelimited("queryFields", queryFields, ",", true); + } + if (outputContentFormat != null) + { + uri.AppendQuery("outputContentFormat", outputContentFormat, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("content-type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateClassifyDocumentRequest(string classifierId, RequestContent content, string stringIndexType, string split, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/documentintelligence", false); + uri.AppendPath("/documentClassifiers/", false); + uri.AppendPath(classifierId, true); + uri.AppendPath(":analyze", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (stringIndexType != null) + { + uri.AppendQuery("stringIndexType", stringIndexType, true); + } + if (split != null) + { + uri.AppendQuery("split", split, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("content-type", "application/json"); + request.Content = content; + return message; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier202; + private static ResponseClassifier ResponseClassifier202 => _responseClassifier202 ??= new StatusCodeClassifier(stackalloc ushort[] { 202 }); + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentAnalysisFeature.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentAnalysisFeature.cs new file mode 100644 index 000000000000..1944a783a071 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentAnalysisFeature.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.DocumentIntelligence +{ + /// Document analysis features to enable. + public readonly partial struct DocumentAnalysisFeature : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DocumentAnalysisFeature(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string OcrHighResolutionValue = "ocrHighResolution"; + private const string LanguagesValue = "languages"; + private const string BarcodesValue = "barcodes"; + private const string FormulasValue = "formulas"; + private const string KeyValuePairsValue = "keyValuePairs"; + private const string StyleFontValue = "styleFont"; + private const string QueryFieldsValue = "queryFields"; + + /// Perform OCR at a higher resolution to handle documents with fine print. + public static DocumentAnalysisFeature OcrHighResolution { get; } = new DocumentAnalysisFeature(OcrHighResolutionValue); + /// Enable the detection of the text content language. + public static DocumentAnalysisFeature Languages { get; } = new DocumentAnalysisFeature(LanguagesValue); + /// Enable the detection of barcodes in the document. + public static DocumentAnalysisFeature Barcodes { get; } = new DocumentAnalysisFeature(BarcodesValue); + /// Enable the detection of mathematical expressions in the document. + public static DocumentAnalysisFeature Formulas { get; } = new DocumentAnalysisFeature(FormulasValue); + /// Enable the detection of general key value pairs (form fields) in the document. + public static DocumentAnalysisFeature KeyValuePairs { get; } = new DocumentAnalysisFeature(KeyValuePairsValue); + /// Enable the recognition of various font styles. + public static DocumentAnalysisFeature StyleFont { get; } = new DocumentAnalysisFeature(StyleFontValue); + /// Enable the extraction of additional fields via the queryFields query parameter. + public static DocumentAnalysisFeature QueryFields { get; } = new DocumentAnalysisFeature(QueryFieldsValue); + /// Determines if two values are the same. + public static bool operator ==(DocumentAnalysisFeature left, DocumentAnalysisFeature right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DocumentAnalysisFeature left, DocumentAnalysisFeature right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DocumentAnalysisFeature(string value) => new DocumentAnalysisFeature(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DocumentAnalysisFeature other && Equals(other); + /// + public bool Equals(DocumentAnalysisFeature other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentBarcode.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentBarcode.cs new file mode 100644 index 000000000000..f394ab79a44e --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentBarcode.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// A barcode object. + public partial class DocumentBarcode + { + /// Initializes a new instance of DocumentBarcode. + /// Barcode kind. + /// Barcode value. + /// Location of the barcode in the reading order concatenated content. + /// Confidence of correctly extracting the barcode. + /// , or is null. + internal DocumentBarcode(string kind, string value, DocumentSpan span, float confidence) + { + Argument.AssertNotNull(kind, nameof(kind)); + Argument.AssertNotNull(value, nameof(value)); + Argument.AssertNotNull(span, nameof(span)); + + Kind = kind; + Value = value; + Polygon = new ChangeTrackingList(); + Span = span; + Confidence = confidence; + } + + /// Initializes a new instance of DocumentBarcode. + /// Barcode kind. + /// Barcode value. + /// + /// Bounding polygon of the barcode, with coordinates specified relative to the + /// top-left of the page. The numbers represent the x, y values of the polygon + /// vertices, clockwise from the left (-180 degrees inclusive) relative to the + /// element orientation. + /// + /// Location of the barcode in the reading order concatenated content. + /// Confidence of correctly extracting the barcode. + internal DocumentBarcode(string kind, string value, IReadOnlyList polygon, DocumentSpan span, float confidence) + { + Kind = kind; + Value = value; + Polygon = polygon; + Span = span; + Confidence = confidence; + } + + /// Barcode kind. + public string Kind { get; } + /// Barcode value. + public string Value { get; } + /// + /// Bounding polygon of the barcode, with coordinates specified relative to the + /// top-left of the page. The numbers represent the x, y values of the polygon + /// vertices, clockwise from the left (-180 degrees inclusive) relative to the + /// element orientation. + /// + public IReadOnlyList Polygon { get; } + /// Location of the barcode in the reading order concatenated content. + public DocumentSpan Span { get; } + /// Confidence of correctly extracting the barcode. + public float Confidence { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentBuildMode.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentBuildMode.cs new file mode 100644 index 000000000000..022f985c53d8 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentBuildMode.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.DocumentIntelligence +{ + /// Custom document model build mode. + public readonly partial struct DocumentBuildMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DocumentBuildMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TemplateValue = "template"; + private const string NeuralValue = "neural"; + + /// Target documents with similar visual templates. + public static DocumentBuildMode Template { get; } = new DocumentBuildMode(TemplateValue); + /// Support documents with diverse visual templates. + public static DocumentBuildMode Neural { get; } = new DocumentBuildMode(NeuralValue); + /// Determines if two values are the same. + public static bool operator ==(DocumentBuildMode left, DocumentBuildMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DocumentBuildMode left, DocumentBuildMode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DocumentBuildMode(string value) => new DocumentBuildMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DocumentBuildMode other && Equals(other); + /// + public bool Equals(DocumentBuildMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentCaption.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentCaption.cs new file mode 100644 index 000000000000..bfb6f53e36f8 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentCaption.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// A caption object describing a table or figure. + public partial class DocumentCaption + { + /// Initializes a new instance of DocumentCaption. + /// Content of the caption. + /// Location of the caption in the reading order concatenated content. + /// or is null. + internal DocumentCaption(string content, IEnumerable spans) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(spans, nameof(spans)); + + Content = content; + BoundingRegions = new ChangeTrackingList(); + Spans = spans.ToList(); + Elements = new ChangeTrackingList(); + } + + /// Initializes a new instance of DocumentCaption. + /// Content of the caption. + /// Bounding regions covering the caption. + /// Location of the caption in the reading order concatenated content. + /// Child elements of the caption. + internal DocumentCaption(string content, IReadOnlyList boundingRegions, IReadOnlyList spans, IReadOnlyList elements) + { + Content = content; + BoundingRegions = boundingRegions; + Spans = spans; + Elements = elements; + } + + /// Content of the caption. + public string Content { get; } + /// Bounding regions covering the caption. + public IReadOnlyList BoundingRegions { get; } + /// Location of the caption in the reading order concatenated content. + public IReadOnlyList Spans { get; } + /// Child elements of the caption. + public IReadOnlyList Elements { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentClassifierBuildOperationDetails.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentClassifierBuildOperationDetails.Serialization.cs new file mode 100644 index 000000000000..a132bd348976 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentClassifierBuildOperationDetails.Serialization.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentClassifierBuildOperationDetails + { + internal static DocumentClassifierBuildOperationDetails DeserializeDocumentClassifierBuildOperationDetails(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional result = default; + Guid operationId = default; + OperationStatus status = default; + Optional percentCompleted = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + OperationKind kind = default; + Uri resourceLocation = default; + Optional apiVersion = default; + Optional> tags = default; + Optional error = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("result"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + result = DocumentClassifierDetails.DeserializeDocumentClassifierDetails(property.Value); + continue; + } + if (property.NameEquals("operationId"u8)) + { + operationId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new OperationStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("percentCompleted"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + percentCompleted = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("kind"u8)) + { + kind = new OperationKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("resourceLocation"u8)) + { + resourceLocation = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = DocumentIntelligenceError.DeserializeDocumentIntelligenceError(property.Value); + continue; + } + } + return new DocumentClassifierBuildOperationDetails(operationId, status, Optional.ToNullable(percentCompleted), createdDateTime, lastUpdatedDateTime, kind, resourceLocation, apiVersion.Value, Optional.ToDictionary(tags), error.Value, result.Value); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new DocumentClassifierBuildOperationDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentClassifierBuildOperationDetails(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentClassifierBuildOperationDetails.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentClassifierBuildOperationDetails.cs new file mode 100644 index 000000000000..273322f83e98 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentClassifierBuildOperationDetails.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// Get Operation response object. + public partial class DocumentClassifierBuildOperationDetails : OperationDetails + { + /// Initializes a new instance of DocumentClassifierBuildOperationDetails. + /// Operation status. + /// Date and time (UTC) when the operation was created. + /// Date and time (UTC) when the status was last updated. + /// URL of the resource targeted by this operation. + /// is null. + internal DocumentClassifierBuildOperationDetails(OperationStatus status, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, Uri resourceLocation) : base(status, createdDateTime, lastUpdatedDateTime, resourceLocation) + { + Argument.AssertNotNull(resourceLocation, nameof(resourceLocation)); + + Kind = OperationKind.DocumentClassifierBuild; + } + + /// Initializes a new instance of DocumentClassifierBuildOperationDetails. + /// Operation ID. + /// Operation status. + /// Operation progress (0-100). + /// Date and time (UTC) when the operation was created. + /// Date and time (UTC) when the status was last updated. + /// Type of operation. + /// URL of the resource targeted by this operation. + /// API version used to create this operation. + /// List of key-value tag attributes associated with the document model. + /// Encountered error. + /// Operation result upon success. + internal DocumentClassifierBuildOperationDetails(Guid operationId, OperationStatus status, int? percentCompleted, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, OperationKind kind, Uri resourceLocation, string apiVersion, IReadOnlyDictionary tags, DocumentIntelligenceError error, DocumentClassifierDetails result) : base(operationId, status, percentCompleted, createdDateTime, lastUpdatedDateTime, kind, resourceLocation, apiVersion, tags, error) + { + Result = result; + } + + /// Operation result upon success. + public DocumentClassifierDetails Result { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentClassifierDetails.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentClassifierDetails.Serialization.cs new file mode 100644 index 000000000000..dd20d6a06c4e --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentClassifierDetails.Serialization.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentClassifierDetails + { + internal static DocumentClassifierDetails DeserializeDocumentClassifierDetails(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string classifierId = default; + Optional description = default; + DateTimeOffset createdDateTime = default; + Optional expirationDateTime = default; + string apiVersion = default; + IReadOnlyDictionary docTypes = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("classifierId"u8)) + { + classifierId = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("expirationDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("docTypes"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, ClassifierDocumentTypeDetails.DeserializeClassifierDocumentTypeDetails(property0.Value)); + } + docTypes = dictionary; + continue; + } + } + return new DocumentClassifierDetails(classifierId, description.Value, createdDateTime, Optional.ToNullable(expirationDateTime), apiVersion, docTypes); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentClassifierDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentClassifierDetails(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentClassifierDetails.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentClassifierDetails.cs new file mode 100644 index 000000000000..13e7d04c7eae --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentClassifierDetails.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// Document classifier info. + public partial class DocumentClassifierDetails + { + /// Initializes a new instance of DocumentClassifierDetails. + /// Unique document classifier name. + /// Date and time (UTC) when the document classifier was created. + /// API version used to create this document classifier. + /// List of document types to classify against. + /// , or is null. + internal DocumentClassifierDetails(string classifierId, DateTimeOffset createdDateTime, string apiVersion, IReadOnlyDictionary docTypes) + { + Argument.AssertNotNull(classifierId, nameof(classifierId)); + Argument.AssertNotNull(apiVersion, nameof(apiVersion)); + Argument.AssertNotNull(docTypes, nameof(docTypes)); + + ClassifierId = classifierId; + CreatedDateTime = createdDateTime; + ApiVersion = apiVersion; + DocTypes = docTypes; + } + + /// Initializes a new instance of DocumentClassifierDetails. + /// Unique document classifier name. + /// Document classifier description. + /// Date and time (UTC) when the document classifier was created. + /// Date and time (UTC) when the document classifier will expire. + /// API version used to create this document classifier. + /// List of document types to classify against. + internal DocumentClassifierDetails(string classifierId, string description, DateTimeOffset createdDateTime, DateTimeOffset? expirationDateTime, string apiVersion, IReadOnlyDictionary docTypes) + { + ClassifierId = classifierId; + Description = description; + CreatedDateTime = createdDateTime; + ExpirationDateTime = expirationDateTime; + ApiVersion = apiVersion; + DocTypes = docTypes; + } + + /// Unique document classifier name. + public string ClassifierId { get; } + /// Document classifier description. + public string Description { get; } + /// Date and time (UTC) when the document classifier was created. + public DateTimeOffset CreatedDateTime { get; } + /// Date and time (UTC) when the document classifier will expire. + public DateTimeOffset? ExpirationDateTime { get; } + /// API version used to create this document classifier. + public string ApiVersion { get; } + /// List of document types to classify against. + public IReadOnlyDictionary DocTypes { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentField.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentField.cs new file mode 100644 index 000000000000..be277e7a26d3 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentField.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// An object representing the content and location of a field value. + public partial class DocumentField + { + /// Initializes a new instance of DocumentField. + /// Data type of the field value. + internal DocumentField(DocumentFieldType type) + { + Type = type; + ValueArray = new ChangeTrackingList(); + ValueObject = new ChangeTrackingDictionary(); + BoundingRegions = new ChangeTrackingList(); + Spans = new ChangeTrackingList(); + } + + /// Initializes a new instance of DocumentField. + /// Data type of the field value. + /// String value. + /// Date value in YYYY-MM-DD format (ISO 8601). + /// Time value in hh:mm:ss format (ISO 8601). + /// Phone number value in E.164 format (ex. +19876543210). + /// Floating point value. + /// Integer value. + /// Selection mark value. + /// Presence of signature. + /// 3-letter country code value (ISO 3166-1 alpha-3). + /// Array of field values. + /// Dictionary of named field values. + /// Currency value. + /// Address value. + /// Boolean value. + /// Field content. + /// Bounding regions covering the field. + /// Location of the field in the reading order concatenated content. + /// Confidence of correctly extracting the field. + internal DocumentField(DocumentFieldType type, string valueString, DateTimeOffset? valueDate, TimeSpan? valueTime, string valuePhoneNumber, double? valueNumber, long? valueInteger, string valueSelectionMark, string valueSignature, string valueCountryRegion, IReadOnlyList valueArray, IReadOnlyDictionary valueObject, CurrencyValue valueCurrency, AddressValue valueAddress, bool? valueBoolean, string content, IReadOnlyList boundingRegions, IReadOnlyList spans, float? confidence) + { + Type = type; + ValueString = valueString; + ValueDate = valueDate; + ValueTime = valueTime; + ValuePhoneNumber = valuePhoneNumber; + ValueNumber = valueNumber; + ValueInteger = valueInteger; + ValueSelectionMark = valueSelectionMark; + ValueSignature = valueSignature; + ValueCountryRegion = valueCountryRegion; + ValueArray = valueArray; + ValueObject = valueObject; + ValueCurrency = valueCurrency; + ValueAddress = valueAddress; + ValueBoolean = valueBoolean; + Content = content; + BoundingRegions = boundingRegions; + Spans = spans; + Confidence = confidence; + } + + /// Data type of the field value. + public DocumentFieldType Type { get; } + /// String value. + public string ValueString { get; } + /// Date value in YYYY-MM-DD format (ISO 8601). + public DateTimeOffset? ValueDate { get; } + /// Time value in hh:mm:ss format (ISO 8601). + public TimeSpan? ValueTime { get; } + /// Phone number value in E.164 format (ex. +19876543210). + public string ValuePhoneNumber { get; } + /// Floating point value. + public double? ValueNumber { get; } + /// Integer value. + public long? ValueInteger { get; } + /// Selection mark value. + public string ValueSelectionMark { get; } + /// Presence of signature. + public string ValueSignature { get; } + /// 3-letter country code value (ISO 3166-1 alpha-3). + public string ValueCountryRegion { get; } + /// Array of field values. + public IReadOnlyList ValueArray { get; } + /// Dictionary of named field values. + public IReadOnlyDictionary ValueObject { get; } + /// Currency value. + public CurrencyValue ValueCurrency { get; } + /// Address value. + public AddressValue ValueAddress { get; } + /// Boolean value. + public bool? ValueBoolean { get; } + /// Field content. + public string Content { get; } + /// Bounding regions covering the field. + public IReadOnlyList BoundingRegions { get; } + /// Location of the field in the reading order concatenated content. + public IReadOnlyList Spans { get; } + /// Confidence of correctly extracting the field. + public float? Confidence { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFieldSchema.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFieldSchema.Serialization.cs new file mode 100644 index 000000000000..be1ec74243e8 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFieldSchema.Serialization.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentFieldSchema + { + internal static DocumentFieldSchema DeserializeDocumentFieldSchema(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DocumentFieldType type = default; + Optional description = default; + Optional example = default; + Optional items = default; + Optional> properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = new DocumentFieldType(property.Value.GetString()); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("example"u8)) + { + example = property.Value.GetString(); + continue; + } + if (property.NameEquals("items"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + items = DeserializeDocumentFieldSchema(property.Value); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, DeserializeDocumentFieldSchema(property0.Value)); + } + properties = dictionary; + continue; + } + } + return new DocumentFieldSchema(type, description.Value, example.Value, items.Value, Optional.ToDictionary(properties)); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentFieldSchema FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentFieldSchema(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFieldSchema.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFieldSchema.cs new file mode 100644 index 000000000000..2a147cffc0b1 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFieldSchema.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// Description of the field semantic schema using a JSON Schema style syntax. + public partial class DocumentFieldSchema + { + /// Initializes a new instance of DocumentFieldSchema. + /// Semantic data type of the field value. + internal DocumentFieldSchema(DocumentFieldType type) + { + Type = type; + Properties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of DocumentFieldSchema. + /// Semantic data type of the field value. + /// Field description. + /// Example field content. + /// Field type schema of each array element. + /// Named sub-fields of the object field. + internal DocumentFieldSchema(DocumentFieldType type, string description, string example, DocumentFieldSchema items, IReadOnlyDictionary properties) + { + Type = type; + Description = description; + Example = example; + Items = items; + Properties = properties; + } + + /// Semantic data type of the field value. + public DocumentFieldType Type { get; } + /// Field description. + public string Description { get; } + /// Example field content. + public string Example { get; } + /// Field type schema of each array element. + public DocumentFieldSchema Items { get; } + /// Named sub-fields of the object field. + public IReadOnlyDictionary Properties { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFieldType.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFieldType.cs new file mode 100644 index 000000000000..6bf22b891a88 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFieldType.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.DocumentIntelligence +{ + /// Semantic data type of the field value. + public readonly partial struct DocumentFieldType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DocumentFieldType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StringValue = "string"; + private const string DateValue = "date"; + private const string TimeValue = "time"; + private const string PhoneNumberValue = "phoneNumber"; + private const string NumberValue = "number"; + private const string IntegerValue = "integer"; + private const string SelectionMarkValue = "selectionMark"; + private const string CountryRegionValue = "countryRegion"; + private const string SignatureValue = "signature"; + private const string ArrayValue = "array"; + private const string ObjectValue = "object"; + private const string CurrencyValue = "currency"; + private const string AddressValue = "address"; + private const string BooleanValue = "boolean"; + + /// Plain text. + public static DocumentFieldType String { get; } = new DocumentFieldType(StringValue); + /// Date, normalized to ISO 8601 (YYYY-MM-DD) format. + public static DocumentFieldType Date { get; } = new DocumentFieldType(DateValue); + /// Time, normalized to ISO 8601 (hh:mm:ss) format. + public static DocumentFieldType Time { get; } = new DocumentFieldType(TimeValue); + /// Phone number, normalized to E.164 (+{CountryCode}{SubscriberNumber}) format. + public static DocumentFieldType PhoneNumber { get; } = new DocumentFieldType(PhoneNumberValue); + /// Floating point number, normalized to double precision floating point. + public static DocumentFieldType Number { get; } = new DocumentFieldType(NumberValue); + /// Integer number, normalized to 64-bit signed integer. + public static DocumentFieldType Integer { get; } = new DocumentFieldType(IntegerValue); + /// Is field selected?. + public static DocumentFieldType SelectionMark { get; } = new DocumentFieldType(SelectionMarkValue); + /// Country/region, normalized to ISO 3166-1 alpha-3 format (ex. USA). + public static DocumentFieldType CountryRegion { get; } = new DocumentFieldType(CountryRegionValue); + /// Is signature present?. + public static DocumentFieldType Signature { get; } = new DocumentFieldType(SignatureValue); + /// List of subfields of the same type. + public static DocumentFieldType Array { get; } = new DocumentFieldType(ArrayValue); + /// Named list of subfields of potentially different types. + public static DocumentFieldType Object { get; } = new DocumentFieldType(ObjectValue); + /// Currency amount with optional currency symbol and unit. + public static DocumentFieldType Currency { get; } = new DocumentFieldType(CurrencyValue); + /// Parsed address. + public static DocumentFieldType Address { get; } = new DocumentFieldType(AddressValue); + /// Boolean value, normalized to true or false. + public static DocumentFieldType Boolean { get; } = new DocumentFieldType(BooleanValue); + /// Determines if two values are the same. + public static bool operator ==(DocumentFieldType left, DocumentFieldType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DocumentFieldType left, DocumentFieldType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DocumentFieldType(string value) => new DocumentFieldType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DocumentFieldType other && Equals(other); + /// + public bool Equals(DocumentFieldType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFigure.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFigure.cs new file mode 100644 index 000000000000..bd66de21908e --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFigure.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// An object representing a figure in the document. + public partial class DocumentFigure + { + /// Initializes a new instance of DocumentFigure. + /// Location of the figure in the reading order concatenated content. + /// is null. + internal DocumentFigure(IEnumerable spans) + { + Argument.AssertNotNull(spans, nameof(spans)); + + BoundingRegions = new ChangeTrackingList(); + Spans = spans.ToList(); + Elements = new ChangeTrackingList(); + Footnotes = new ChangeTrackingList(); + } + + /// Initializes a new instance of DocumentFigure. + /// Bounding regions covering the figure. + /// Location of the figure in the reading order concatenated content. + /// Child elements of the figure, excluding any caption or footnotes. + /// Caption associated with the figure. + /// List of footnotes associated with the figure. + internal DocumentFigure(IReadOnlyList boundingRegions, IReadOnlyList spans, IReadOnlyList elements, DocumentCaption caption, IReadOnlyList footnotes) + { + BoundingRegions = boundingRegions; + Spans = spans; + Elements = elements; + Caption = caption; + Footnotes = footnotes; + } + + /// Bounding regions covering the figure. + public IReadOnlyList BoundingRegions { get; } + /// Location of the figure in the reading order concatenated content. + public IReadOnlyList Spans { get; } + /// Child elements of the figure, excluding any caption or footnotes. + public IReadOnlyList Elements { get; } + /// Caption associated with the figure. + public DocumentCaption Caption { get; } + /// List of footnotes associated with the figure. + public IReadOnlyList Footnotes { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFootnote.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFootnote.cs new file mode 100644 index 000000000000..a6d2f9dc45fc --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFootnote.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// A footnote object describing a table or figure. + public partial class DocumentFootnote + { + /// Initializes a new instance of DocumentFootnote. + /// Content of the footnote. + /// Location of the footnote in the reading order concatenated content. + /// or is null. + internal DocumentFootnote(string content, IEnumerable spans) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(spans, nameof(spans)); + + Content = content; + BoundingRegions = new ChangeTrackingList(); + Spans = spans.ToList(); + Elements = new ChangeTrackingList(); + } + + /// Initializes a new instance of DocumentFootnote. + /// Content of the footnote. + /// Bounding regions covering the footnote. + /// Location of the footnote in the reading order concatenated content. + /// Child elements of the footnote. + internal DocumentFootnote(string content, IReadOnlyList boundingRegions, IReadOnlyList spans, IReadOnlyList elements) + { + Content = content; + BoundingRegions = boundingRegions; + Spans = spans; + Elements = elements; + } + + /// Content of the footnote. + public string Content { get; } + /// Bounding regions covering the footnote. + public IReadOnlyList BoundingRegions { get; } + /// Location of the footnote in the reading order concatenated content. + public IReadOnlyList Spans { get; } + /// Child elements of the footnote. + public IReadOnlyList Elements { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFormula.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFormula.cs new file mode 100644 index 000000000000..17351879d7e9 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFormula.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// A formula object. + public partial class DocumentFormula + { + /// Initializes a new instance of DocumentFormula. + /// Formula kind. + /// LaTex expression describing the formula. + /// Location of the formula in the reading order concatenated content. + /// Confidence of correctly extracting the formula. + /// , or is null. + internal DocumentFormula(string kind, string value, DocumentSpan span, float confidence) + { + Argument.AssertNotNull(kind, nameof(kind)); + Argument.AssertNotNull(value, nameof(value)); + Argument.AssertNotNull(span, nameof(span)); + + Kind = kind; + Value = value; + Polygon = new ChangeTrackingList(); + Span = span; + Confidence = confidence; + } + + /// Initializes a new instance of DocumentFormula. + /// Formula kind. + /// LaTex expression describing the formula. + /// + /// Bounding polygon of the formula, with coordinates specified relative to the + /// top-left of the page. The numbers represent the x, y values of the polygon + /// vertices, clockwise from the left (-180 degrees inclusive) relative to the + /// element orientation. + /// + /// Location of the formula in the reading order concatenated content. + /// Confidence of correctly extracting the formula. + internal DocumentFormula(string kind, string value, IReadOnlyList polygon, DocumentSpan span, float confidence) + { + Kind = kind; + Value = value; + Polygon = polygon; + Span = span; + Confidence = confidence; + } + + /// Formula kind. + public string Kind { get; } + /// LaTex expression describing the formula. + public string Value { get; } + /// + /// Bounding polygon of the formula, with coordinates specified relative to the + /// top-left of the page. The numbers represent the x, y values of the polygon + /// vertices, clockwise from the left (-180 degrees inclusive) relative to the + /// element orientation. + /// + public IReadOnlyList Polygon { get; } + /// Location of the formula in the reading order concatenated content. + public DocumentSpan Span { get; } + /// Confidence of correctly extracting the formula. + public float Confidence { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentIntelligenceError.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentIntelligenceError.Serialization.cs new file mode 100644 index 000000000000..5d6fe712306d --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentIntelligenceError.Serialization.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentIntelligenceError + { + internal static DocumentIntelligenceError DeserializeDocumentIntelligenceError(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string code = default; + string message = default; + Optional target = default; + Optional> details = default; + Optional innererror = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); + continue; + } + if (property.NameEquals("details"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeserializeDocumentIntelligenceError(item)); + } + details = array; + continue; + } + if (property.NameEquals("innererror"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + innererror = InnerError.DeserializeInnerError(property.Value); + continue; + } + } + return new DocumentIntelligenceError(code, message, target.Value, Optional.ToList(details), innererror.Value); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentIntelligenceError FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentIntelligenceError(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentIntelligenceError.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentIntelligenceError.cs new file mode 100644 index 000000000000..64c7ce696d4a --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentIntelligenceError.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// Error info. + public partial class DocumentIntelligenceError + { + /// Initializes a new instance of DocumentIntelligenceError. + /// Error code. + /// Error message. + /// or is null. + internal DocumentIntelligenceError(string code, string message) + { + Argument.AssertNotNull(code, nameof(code)); + Argument.AssertNotNull(message, nameof(message)); + + Code = code; + Message = message; + Details = new ChangeTrackingList(); + } + + /// Initializes a new instance of DocumentIntelligenceError. + /// Error code. + /// Error message. + /// Target of the error. + /// List of detailed errors. + /// Detailed error. + internal DocumentIntelligenceError(string code, string message, string target, IReadOnlyList details, InnerError innererror) + { + Code = code; + Message = message; + Target = target; + Details = details; + Innererror = innererror; + } + + /// Error code. + public string Code { get; } + /// Error message. + public string Message { get; } + /// Target of the error. + public string Target { get; } + /// List of detailed errors. + public IReadOnlyList Details { get; } + /// Detailed error. + public InnerError Innererror { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentKeyValueElement.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentKeyValueElement.cs new file mode 100644 index 000000000000..a3ec5d78b4dc --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentKeyValueElement.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// An object representing the field key or value in a key-value pair. + public partial class DocumentKeyValueElement + { + /// Initializes a new instance of DocumentKeyValueElement. + /// Concatenated content of the key-value element in reading order. + /// Location of the key-value element in the reading order concatenated content. + /// or is null. + internal DocumentKeyValueElement(string content, IEnumerable spans) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(spans, nameof(spans)); + + Content = content; + BoundingRegions = new ChangeTrackingList(); + Spans = spans.ToList(); + } + + /// Initializes a new instance of DocumentKeyValueElement. + /// Concatenated content of the key-value element in reading order. + /// Bounding regions covering the key-value element. + /// Location of the key-value element in the reading order concatenated content. + internal DocumentKeyValueElement(string content, IReadOnlyList boundingRegions, IReadOnlyList spans) + { + Content = content; + BoundingRegions = boundingRegions; + Spans = spans; + } + + /// Concatenated content of the key-value element in reading order. + public string Content { get; } + /// Bounding regions covering the key-value element. + public IReadOnlyList BoundingRegions { get; } + /// Location of the key-value element in the reading order concatenated content. + public IReadOnlyList Spans { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentKeyValuePair.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentKeyValuePair.cs new file mode 100644 index 000000000000..e80c425aa6a7 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentKeyValuePair.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// + /// An object representing a form field with distinct field label (key) and field + /// value (may be empty). + /// + public partial class DocumentKeyValuePair + { + /// Initializes a new instance of DocumentKeyValuePair. + /// Field label of the key-value pair. + /// Confidence of correctly extracting the key-value pair. + /// is null. + internal DocumentKeyValuePair(DocumentKeyValueElement key, float confidence) + { + Argument.AssertNotNull(key, nameof(key)); + + Key = key; + Confidence = confidence; + } + + /// Initializes a new instance of DocumentKeyValuePair. + /// Field label of the key-value pair. + /// Field value of the key-value pair. + /// Confidence of correctly extracting the key-value pair. + internal DocumentKeyValuePair(DocumentKeyValueElement key, DocumentKeyValueElement value, float confidence) + { + Key = key; + Value = value; + Confidence = confidence; + } + + /// Field label of the key-value pair. + public DocumentKeyValueElement Key { get; } + /// Field value of the key-value pair. + public DocumentKeyValueElement Value { get; } + /// Confidence of correctly extracting the key-value pair. + public float Confidence { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentLanguage.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentLanguage.cs new file mode 100644 index 000000000000..1ae393d2f3ba --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentLanguage.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// An object representing the detected language for a given text span. + public partial class DocumentLanguage + { + /// Initializes a new instance of DocumentLanguage. + /// + /// Detected language. Value may an ISO 639-1 language code (ex. "en", "fr") + /// or BCP 47 language tag (ex. "zh-Hans"). + /// + /// + /// Location of the text elements in the concatenated content the language applies + /// to. + /// + /// Confidence of correctly identifying the language. + /// or is null. + internal DocumentLanguage(string locale, IEnumerable spans, float confidence) + { + Argument.AssertNotNull(locale, nameof(locale)); + Argument.AssertNotNull(spans, nameof(spans)); + + Locale = locale; + Spans = spans.ToList(); + Confidence = confidence; + } + + /// Initializes a new instance of DocumentLanguage. + /// + /// Detected language. Value may an ISO 639-1 language code (ex. "en", "fr") + /// or BCP 47 language tag (ex. "zh-Hans"). + /// + /// + /// Location of the text elements in the concatenated content the language applies + /// to. + /// + /// Confidence of correctly identifying the language. + internal DocumentLanguage(string locale, IReadOnlyList spans, float confidence) + { + Locale = locale; + Spans = spans; + Confidence = confidence; + } + + /// + /// Detected language. Value may an ISO 639-1 language code (ex. "en", "fr") + /// or BCP 47 language tag (ex. "zh-Hans"). + /// + public string Locale { get; } + /// + /// Location of the text elements in the concatenated content the language applies + /// to. + /// + public IReadOnlyList Spans { get; } + /// Confidence of correctly identifying the language. + public float Confidence { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentLine.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentLine.cs new file mode 100644 index 000000000000..02c0fcd9d28e --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentLine.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// + /// A content line object consisting of an adjacent sequence of content elements, + /// such as words and selection marks. + /// + public partial class DocumentLine + { + /// Initializes a new instance of DocumentLine. + /// Concatenated content of the contained elements in reading order. + /// Location of the line in the reading order concatenated content. + /// or is null. + internal DocumentLine(string content, IEnumerable spans) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(spans, nameof(spans)); + + Content = content; + Polygon = new ChangeTrackingList(); + Spans = spans.ToList(); + } + + /// Initializes a new instance of DocumentLine. + /// Concatenated content of the contained elements in reading order. + /// + /// Bounding polygon of the line, with coordinates specified relative to the + /// top-left of the page. The numbers represent the x, y values of the polygon + /// vertices, clockwise from the left (-180 degrees inclusive) relative to the + /// element orientation. + /// + /// Location of the line in the reading order concatenated content. + internal DocumentLine(string content, IReadOnlyList polygon, IReadOnlyList spans) + { + Content = content; + Polygon = polygon; + Spans = spans; + } + + /// Concatenated content of the contained elements in reading order. + public string Content { get; } + /// + /// Bounding polygon of the line, with coordinates specified relative to the + /// top-left of the page. The numbers represent the x, y values of the polygon + /// vertices, clockwise from the left (-180 degrees inclusive) relative to the + /// element orientation. + /// + public IReadOnlyList Polygon { get; } + /// Location of the line in the reading order concatenated content. + public IReadOnlyList Spans { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentList.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentList.cs new file mode 100644 index 000000000000..e28598517ea9 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentList.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// An object representing a list in the document. + public partial class DocumentList + { + /// Initializes a new instance of DocumentList. + /// Location of the list in the reading order concatenated content. + /// Items in the list. + /// or is null. + internal DocumentList(IEnumerable spans, IEnumerable items) + { + Argument.AssertNotNull(spans, nameof(spans)); + Argument.AssertNotNull(items, nameof(items)); + + Spans = spans.ToList(); + Items = items.ToList(); + } + + /// Initializes a new instance of DocumentList. + /// Location of the list in the reading order concatenated content. + /// Items in the list. + internal DocumentList(IReadOnlyList spans, IReadOnlyList items) + { + Spans = spans; + Items = items; + } + + /// Location of the list in the reading order concatenated content. + public IReadOnlyList Spans { get; } + /// Items in the list. + public IReadOnlyList Items { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentListItem.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentListItem.cs new file mode 100644 index 000000000000..be172243cc98 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentListItem.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// An object representing a list item in the document. + public partial class DocumentListItem + { + /// Initializes a new instance of DocumentListItem. + /// Level of the list item (1-indexed). + /// Content of the list item. + /// Location of the list item in the reading order concatenated content. + /// or is null. + internal DocumentListItem(int level, string content, IEnumerable spans) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(spans, nameof(spans)); + + Level = level; + Content = content; + BoundingRegions = new ChangeTrackingList(); + Spans = spans.ToList(); + Elements = new ChangeTrackingList(); + } + + /// Initializes a new instance of DocumentListItem. + /// Level of the list item (1-indexed). + /// Content of the list item. + /// Bounding regions covering the list item. + /// Location of the list item in the reading order concatenated content. + /// Child elements of the list item. + internal DocumentListItem(int level, string content, IReadOnlyList boundingRegions, IReadOnlyList spans, IReadOnlyList elements) + { + Level = level; + Content = content; + BoundingRegions = boundingRegions; + Spans = spans; + Elements = elements; + } + + /// Level of the list item (1-indexed). + public int Level { get; } + /// Content of the list item. + public string Content { get; } + /// Bounding regions covering the list item. + public IReadOnlyList BoundingRegions { get; } + /// Location of the list item in the reading order concatenated content. + public IReadOnlyList Spans { get; } + /// Child elements of the list item. + public IReadOnlyList Elements { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelAdministrationClient.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelAdministrationClient.cs new file mode 100644 index 000000000000..34f71bef4021 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelAdministrationClient.cs @@ -0,0 +1,1698 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.AI.DocumentIntelligence +{ + // Data plane generated client. + /// The DocumentModelAdministration service client. + public partial class DocumentModelAdministrationClient + { + private const string AuthorizationHeader = "Ocp-Apim-Subscription-Key"; + private readonly AzureKeyCredential _keyCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of DocumentModelAdministrationClient for mocking. + protected DocumentModelAdministrationClient() + { + } + + /// Initializes a new instance of DocumentModelAdministrationClient. + /// The Document Intelligence service endpoint. + /// A credential used to authenticate to an Azure Service. + /// or is null. + public DocumentModelAdministrationClient(Uri endpoint, AzureKeyCredential credential) : this(endpoint, credential, new AzureAIDocumentIntelligenceClientOptions()) + { + } + + /// Initializes a new instance of DocumentModelAdministrationClient. + /// The Document Intelligence service endpoint. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + /// or is null. + public DocumentModelAdministrationClient(Uri endpoint, AzureKeyCredential credential, AzureAIDocumentIntelligenceClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new AzureAIDocumentIntelligenceClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _keyCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new AzureKeyCredentialPolicy(_keyCredential, AuthorizationHeader) }, new ResponseClassifier()); + _endpoint = endpoint; + _apiVersion = options.Version; + } + + /// + /// Generates authorization to copy a document model to this location with + /// specified modelId and optional description. + /// + /// Authorize copy request parameters. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task> AuthorizeModelCopyAsync(AuthorizeCopyRequest authorizeCopyRequest, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(authorizeCopyRequest, nameof(authorizeCopyRequest)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = authorizeCopyRequest.ToRequestContent(); + Response response = await AuthorizeModelCopyAsync(content, context).ConfigureAwait(false); + return Response.FromValue(CopyAuthorization.FromResponse(response), response); + } + + /// + /// Generates authorization to copy a document model to this location with + /// specified modelId and optional description. + /// + /// Authorize copy request parameters. + /// The cancellation token to use. + /// is null. + /// + public virtual Response AuthorizeModelCopy(AuthorizeCopyRequest authorizeCopyRequest, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(authorizeCopyRequest, nameof(authorizeCopyRequest)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = authorizeCopyRequest.ToRequestContent(); + Response response = AuthorizeModelCopy(content, context); + return Response.FromValue(CopyAuthorization.FromResponse(response), response); + } + + /// + /// [Protocol Method] Generates authorization to copy a document model to this location with + /// specified modelId and optional description. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task AuthorizeModelCopyAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("DocumentModelAdministrationClient.AuthorizeModelCopy"); + scope.Start(); + try + { + using HttpMessage message = CreateAuthorizeModelCopyRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Generates authorization to copy a document model to this location with + /// specified modelId and optional description. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response AuthorizeModelCopy(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("DocumentModelAdministrationClient.AuthorizeModelCopy"); + scope.Start(); + try + { + using HttpMessage message = CreateAuthorizeModelCopyRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets detailed document model information. + /// Unique document model name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetModelAsync(string modelId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(modelId, nameof(modelId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetModelAsync(modelId, context).ConfigureAwait(false); + return Response.FromValue(DocumentModelDetails.FromResponse(response), response); + } + + /// Gets detailed document model information. + /// Unique document model name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetModel(string modelId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(modelId, nameof(modelId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetModel(modelId, context); + return Response.FromValue(DocumentModelDetails.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets detailed document model information. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Unique document model name. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetModelAsync(string modelId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(modelId, nameof(modelId)); + + using var scope = ClientDiagnostics.CreateScope("DocumentModelAdministrationClient.GetModel"); + scope.Start(); + try + { + using HttpMessage message = CreateGetModelRequest(modelId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets detailed document model information. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Unique document model name. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetModel(string modelId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(modelId, nameof(modelId)); + + using var scope = ClientDiagnostics.CreateScope("DocumentModelAdministrationClient.GetModel"); + scope.Start(); + try + { + using HttpMessage message = CreateGetModelRequest(modelId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Deletes document model. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Unique document model name. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task DeleteModelAsync(string modelId, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(modelId, nameof(modelId)); + + using var scope = ClientDiagnostics.CreateScope("DocumentModelAdministrationClient.DeleteModel"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteModelRequest(modelId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Deletes document model. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Unique document model name. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response DeleteModel(string modelId, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(modelId, nameof(modelId)); + + using var scope = ClientDiagnostics.CreateScope("DocumentModelAdministrationClient.DeleteModel"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteModelRequest(modelId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Return information about the current resource. + /// The cancellation token to use. + /// + public virtual async Task> GetResourceInfoAsync(CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetResourceInfoAsync(context).ConfigureAwait(false); + return Response.FromValue(ResourceDetails.FromResponse(response), response); + } + + /// Return information about the current resource. + /// The cancellation token to use. + /// + public virtual Response GetResourceInfo(CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetResourceInfo(context); + return Response.FromValue(ResourceDetails.FromResponse(response), response); + } + + /// + /// [Protocol Method] Return information about the current resource. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetResourceInfoAsync(RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("DocumentModelAdministrationClient.GetResourceInfo"); + scope.Start(); + try + { + using HttpMessage message = CreateGetResourceInfoRequest(context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Return information about the current resource. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetResourceInfo(RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("DocumentModelAdministrationClient.GetResourceInfo"); + scope.Start(); + try + { + using HttpMessage message = CreateGetResourceInfoRequest(context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets operation info. + /// Operation ID. + /// The cancellation token to use. + /// + public virtual async Task> GetOperationAsync(Guid operationId, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetOperationAsync(operationId, context).ConfigureAwait(false); + return Response.FromValue(OperationDetails.FromResponse(response), response); + } + + /// Gets operation info. + /// Operation ID. + /// The cancellation token to use. + /// + public virtual Response GetOperation(Guid operationId, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetOperation(operationId, context); + return Response.FromValue(OperationDetails.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets operation info. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Operation ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetOperationAsync(Guid operationId, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("DocumentModelAdministrationClient.GetOperation"); + scope.Start(); + try + { + using HttpMessage message = CreateGetOperationRequest(operationId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets operation info. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Operation ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetOperation(Guid operationId, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("DocumentModelAdministrationClient.GetOperation"); + scope.Start(); + try + { + using HttpMessage message = CreateGetOperationRequest(operationId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets detailed document classifier information. + /// Unique document classifier name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetClassifierAsync(string classifierId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(classifierId, nameof(classifierId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetClassifierAsync(classifierId, context).ConfigureAwait(false); + return Response.FromValue(DocumentClassifierDetails.FromResponse(response), response); + } + + /// Gets detailed document classifier information. + /// Unique document classifier name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetClassifier(string classifierId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(classifierId, nameof(classifierId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetClassifier(classifierId, context); + return Response.FromValue(DocumentClassifierDetails.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets detailed document classifier information. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Unique document classifier name. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetClassifierAsync(string classifierId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(classifierId, nameof(classifierId)); + + using var scope = ClientDiagnostics.CreateScope("DocumentModelAdministrationClient.GetClassifier"); + scope.Start(); + try + { + using HttpMessage message = CreateGetClassifierRequest(classifierId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets detailed document classifier information. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Unique document classifier name. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetClassifier(string classifierId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(classifierId, nameof(classifierId)); + + using var scope = ClientDiagnostics.CreateScope("DocumentModelAdministrationClient.GetClassifier"); + scope.Start(); + try + { + using HttpMessage message = CreateGetClassifierRequest(classifierId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Deletes document classifier. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Unique document classifier name. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task DeleteClassifierAsync(string classifierId, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(classifierId, nameof(classifierId)); + + using var scope = ClientDiagnostics.CreateScope("DocumentModelAdministrationClient.DeleteClassifier"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteClassifierRequest(classifierId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Deletes document classifier. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Unique document classifier name. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response DeleteClassifier(string classifierId, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(classifierId, nameof(classifierId)); + + using var scope = ClientDiagnostics.CreateScope("DocumentModelAdministrationClient.DeleteClassifier"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteClassifierRequest(classifierId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List all document models. + /// The cancellation token to use. + /// + public virtual AsyncPageable GetModelsAsync(CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetModelsRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetModelsNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, DocumentModelSummary.DeserializeDocumentModelSummary, ClientDiagnostics, _pipeline, "DocumentModelAdministrationClient.GetModels", "value", "nextLink", context); + } + + /// List all document models. + /// The cancellation token to use. + /// + public virtual Pageable GetModels(CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetModelsRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetModelsNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, DocumentModelSummary.DeserializeDocumentModelSummary, ClientDiagnostics, _pipeline, "DocumentModelAdministrationClient.GetModels", "value", "nextLink", context); + } + + /// + /// [Protocol Method] List all document models + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetModelsAsync(RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetModelsRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetModelsNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "DocumentModelAdministrationClient.GetModels", "value", "nextLink", context); + } + + /// + /// [Protocol Method] List all document models + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetModels(RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetModelsRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetModelsNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "DocumentModelAdministrationClient.GetModels", "value", "nextLink", context); + } + + /// Lists all operations. + /// The cancellation token to use. + /// + public virtual AsyncPageable GetOperationsAsync(CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetOperationsRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetOperationsNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, OperationSummary.DeserializeOperationSummary, ClientDiagnostics, _pipeline, "DocumentModelAdministrationClient.GetOperations", "value", "nextLink", context); + } + + /// Lists all operations. + /// The cancellation token to use. + /// + public virtual Pageable GetOperations(CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetOperationsRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetOperationsNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, OperationSummary.DeserializeOperationSummary, ClientDiagnostics, _pipeline, "DocumentModelAdministrationClient.GetOperations", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists all operations. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetOperationsAsync(RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetOperationsRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetOperationsNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "DocumentModelAdministrationClient.GetOperations", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists all operations. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetOperations(RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetOperationsRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetOperationsNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "DocumentModelAdministrationClient.GetOperations", "value", "nextLink", context); + } + + /// List all document classifiers. + /// The cancellation token to use. + /// + public virtual AsyncPageable GetClassifiersAsync(CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetClassifiersRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetClassifiersNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, DocumentClassifierDetails.DeserializeDocumentClassifierDetails, ClientDiagnostics, _pipeline, "DocumentModelAdministrationClient.GetClassifiers", "value", "nextLink", context); + } + + /// List all document classifiers. + /// The cancellation token to use. + /// + public virtual Pageable GetClassifiers(CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetClassifiersRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetClassifiersNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, DocumentClassifierDetails.DeserializeDocumentClassifierDetails, ClientDiagnostics, _pipeline, "DocumentModelAdministrationClient.GetClassifiers", "value", "nextLink", context); + } + + /// + /// [Protocol Method] List all document classifiers. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetClassifiersAsync(RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetClassifiersRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetClassifiersNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "DocumentModelAdministrationClient.GetClassifiers", "value", "nextLink", context); + } + + /// + /// [Protocol Method] List all document classifiers. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetClassifiers(RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetClassifiersRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetClassifiersNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "DocumentModelAdministrationClient.GetClassifiers", "value", "nextLink", context); + } + + /// Builds a custom document analysis model. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Build request parameters. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task> BuildDocumentAsync(WaitUntil waitUntil, BuildDocumentModelRequest buildRequest, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(buildRequest, nameof(buildRequest)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = buildRequest.ToRequestContent(); + Operation response = await BuildDocumentAsync(waitUntil, content, context).ConfigureAwait(false); + return ProtocolOperationHelpers.Convert(response, DocumentModelDetails.FromResponse, ClientDiagnostics, "DocumentModelAdministrationClient.BuildDocument"); + } + + /// Builds a custom document analysis model. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Build request parameters. + /// The cancellation token to use. + /// is null. + /// + public virtual Operation BuildDocument(WaitUntil waitUntil, BuildDocumentModelRequest buildRequest, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(buildRequest, nameof(buildRequest)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = buildRequest.ToRequestContent(); + Operation response = BuildDocument(waitUntil, content, context); + return ProtocolOperationHelpers.Convert(response, DocumentModelDetails.FromResponse, ClientDiagnostics, "DocumentModelAdministrationClient.BuildDocument"); + } + + /// + /// [Protocol Method] Builds a custom document analysis model. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task> BuildDocumentAsync(WaitUntil waitUntil, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("DocumentModelAdministrationClient.BuildDocument"); + scope.Start(); + try + { + using HttpMessage message = CreateBuildDocumentRequest(content, context); + return await ProtocolOperationHelpers.ProcessMessageAsync(_pipeline, message, ClientDiagnostics, "DocumentModelAdministrationClient.BuildDocument", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Builds a custom document analysis model. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation BuildDocument(WaitUntil waitUntil, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("DocumentModelAdministrationClient.BuildDocument"); + scope.Start(); + try + { + using HttpMessage message = CreateBuildDocumentRequest(content, context); + return ProtocolOperationHelpers.ProcessMessage(_pipeline, message, ClientDiagnostics, "DocumentModelAdministrationClient.BuildDocument", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Creates a new document model from document types of existing document models. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Compose request parameters. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task> ComposeModelAsync(WaitUntil waitUntil, ComposeDocumentModelRequest composeRequest, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(composeRequest, nameof(composeRequest)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = composeRequest.ToRequestContent(); + Operation response = await ComposeModelAsync(waitUntil, content, context).ConfigureAwait(false); + return ProtocolOperationHelpers.Convert(response, DocumentModelDetails.FromResponse, ClientDiagnostics, "DocumentModelAdministrationClient.ComposeModel"); + } + + /// Creates a new document model from document types of existing document models. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Compose request parameters. + /// The cancellation token to use. + /// is null. + /// + public virtual Operation ComposeModel(WaitUntil waitUntil, ComposeDocumentModelRequest composeRequest, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(composeRequest, nameof(composeRequest)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = composeRequest.ToRequestContent(); + Operation response = ComposeModel(waitUntil, content, context); + return ProtocolOperationHelpers.Convert(response, DocumentModelDetails.FromResponse, ClientDiagnostics, "DocumentModelAdministrationClient.ComposeModel"); + } + + /// + /// [Protocol Method] Creates a new document model from document types of existing document models. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task> ComposeModelAsync(WaitUntil waitUntil, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("DocumentModelAdministrationClient.ComposeModel"); + scope.Start(); + try + { + using HttpMessage message = CreateComposeModelRequest(content, context); + return await ProtocolOperationHelpers.ProcessMessageAsync(_pipeline, message, ClientDiagnostics, "DocumentModelAdministrationClient.ComposeModel", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Creates a new document model from document types of existing document models. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation ComposeModel(WaitUntil waitUntil, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("DocumentModelAdministrationClient.ComposeModel"); + scope.Start(); + try + { + using HttpMessage message = CreateComposeModelRequest(content, context); + return ProtocolOperationHelpers.ProcessMessage(_pipeline, message, ClientDiagnostics, "DocumentModelAdministrationClient.ComposeModel", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Copies document model to the target resource, region, and modelId. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Unique document model name. + /// Copy to request parameters. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> CopyModelToAsync(WaitUntil waitUntil, string modelId, CopyAuthorization copyToRequest, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(modelId, nameof(modelId)); + Argument.AssertNotNull(copyToRequest, nameof(copyToRequest)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = copyToRequest.ToRequestContent(); + Operation response = await CopyModelToAsync(waitUntil, modelId, content, context).ConfigureAwait(false); + return ProtocolOperationHelpers.Convert(response, DocumentModelDetails.FromResponse, ClientDiagnostics, "DocumentModelAdministrationClient.CopyModelTo"); + } + + /// Copies document model to the target resource, region, and modelId. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Unique document model name. + /// Copy to request parameters. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Operation CopyModelTo(WaitUntil waitUntil, string modelId, CopyAuthorization copyToRequest, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(modelId, nameof(modelId)); + Argument.AssertNotNull(copyToRequest, nameof(copyToRequest)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = copyToRequest.ToRequestContent(); + Operation response = CopyModelTo(waitUntil, modelId, content, context); + return ProtocolOperationHelpers.Convert(response, DocumentModelDetails.FromResponse, ClientDiagnostics, "DocumentModelAdministrationClient.CopyModelTo"); + } + + /// + /// [Protocol Method] Copies document model to the target resource, region, and modelId. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Unique document model name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task> CopyModelToAsync(WaitUntil waitUntil, string modelId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(modelId, nameof(modelId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("DocumentModelAdministrationClient.CopyModelTo"); + scope.Start(); + try + { + using HttpMessage message = CreateCopyModelToRequest(modelId, content, context); + return await ProtocolOperationHelpers.ProcessMessageAsync(_pipeline, message, ClientDiagnostics, "DocumentModelAdministrationClient.CopyModelTo", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Copies document model to the target resource, region, and modelId. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Unique document model name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation CopyModelTo(WaitUntil waitUntil, string modelId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(modelId, nameof(modelId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("DocumentModelAdministrationClient.CopyModelTo"); + scope.Start(); + try + { + using HttpMessage message = CreateCopyModelToRequest(modelId, content, context); + return ProtocolOperationHelpers.ProcessMessage(_pipeline, message, ClientDiagnostics, "DocumentModelAdministrationClient.CopyModelTo", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Builds a custom document classifier. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Build request parameters. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task> BuildClassifierAsync(WaitUntil waitUntil, BuildDocumentClassifierRequest buildRequest, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(buildRequest, nameof(buildRequest)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = buildRequest.ToRequestContent(); + Operation response = await BuildClassifierAsync(waitUntil, content, context).ConfigureAwait(false); + return ProtocolOperationHelpers.Convert(response, DocumentClassifierDetails.FromResponse, ClientDiagnostics, "DocumentModelAdministrationClient.BuildClassifier"); + } + + /// Builds a custom document classifier. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Build request parameters. + /// The cancellation token to use. + /// is null. + /// + public virtual Operation BuildClassifier(WaitUntil waitUntil, BuildDocumentClassifierRequest buildRequest, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(buildRequest, nameof(buildRequest)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = buildRequest.ToRequestContent(); + Operation response = BuildClassifier(waitUntil, content, context); + return ProtocolOperationHelpers.Convert(response, DocumentClassifierDetails.FromResponse, ClientDiagnostics, "DocumentModelAdministrationClient.BuildClassifier"); + } + + /// + /// [Protocol Method] Builds a custom document classifier. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task> BuildClassifierAsync(WaitUntil waitUntil, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("DocumentModelAdministrationClient.BuildClassifier"); + scope.Start(); + try + { + using HttpMessage message = CreateBuildClassifierRequest(content, context); + return await ProtocolOperationHelpers.ProcessMessageAsync(_pipeline, message, ClientDiagnostics, "DocumentModelAdministrationClient.BuildClassifier", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Builds a custom document classifier. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation BuildClassifier(WaitUntil waitUntil, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("DocumentModelAdministrationClient.BuildClassifier"); + scope.Start(); + try + { + using HttpMessage message = CreateBuildClassifierRequest(content, context); + return ProtocolOperationHelpers.ProcessMessage(_pipeline, message, ClientDiagnostics, "DocumentModelAdministrationClient.BuildClassifier", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + internal HttpMessage CreateBuildDocumentRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/documentintelligence", false); + uri.AppendPath("/documentModels:build", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateComposeModelRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/documentintelligence", false); + uri.AppendPath("/documentModels:compose", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateAuthorizeModelCopyRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/documentintelligence", false); + uri.AppendPath("/documentModels:authorizeCopy", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateCopyModelToRequest(string modelId, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/documentintelligence", false); + uri.AppendPath("/documentModels/", false); + uri.AppendPath(modelId, true); + uri.AppendPath(":copyTo", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetModelRequest(string modelId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/documentintelligence", false); + uri.AppendPath("/documentModels/", false); + uri.AppendPath(modelId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetModelsRequest(RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/documentintelligence", false); + uri.AppendPath("/documentModels", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateDeleteModelRequest(string modelId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/documentintelligence", false); + uri.AppendPath("/documentModels/", false); + uri.AppendPath(modelId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetResourceInfoRequest(RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/documentintelligence", false); + uri.AppendPath("/info", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetOperationRequest(Guid operationId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/documentintelligence", false); + uri.AppendPath("/operations/", false); + uri.AppendPath(operationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetOperationsRequest(RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/documentintelligence", false); + uri.AppendPath("/operations", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateBuildClassifierRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/documentintelligence", false); + uri.AppendPath("/documentClassifiers:build", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetClassifierRequest(string classifierId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/documentintelligence", false); + uri.AppendPath("/documentClassifiers/", false); + uri.AppendPath(classifierId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetClassifiersRequest(RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/documentintelligence", false); + uri.AppendPath("/documentClassifiers", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateDeleteClassifierRequest(string classifierId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/documentintelligence", false); + uri.AppendPath("/documentClassifiers/", false); + uri.AppendPath(classifierId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetModelsNextPageRequest(string nextLink, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/documentintelligence", false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetOperationsNextPageRequest(string nextLink, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/documentintelligence", false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetClassifiersNextPageRequest(string nextLink, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/documentintelligence", false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier202; + private static ResponseClassifier ResponseClassifier202 => _responseClassifier202 ??= new StatusCodeClassifier(stackalloc ushort[] { 202 }); + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + private static ResponseClassifier _responseClassifier204; + private static ResponseClassifier ResponseClassifier204 => _responseClassifier204 ??= new StatusCodeClassifier(stackalloc ushort[] { 204 }); + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelBuildOperationDetails.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelBuildOperationDetails.Serialization.cs new file mode 100644 index 000000000000..3f8163626b23 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelBuildOperationDetails.Serialization.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentModelBuildOperationDetails + { + internal static DocumentModelBuildOperationDetails DeserializeDocumentModelBuildOperationDetails(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional result = default; + Guid operationId = default; + OperationStatus status = default; + Optional percentCompleted = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + OperationKind kind = default; + Uri resourceLocation = default; + Optional apiVersion = default; + Optional> tags = default; + Optional error = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("result"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + result = DocumentModelDetails.DeserializeDocumentModelDetails(property.Value); + continue; + } + if (property.NameEquals("operationId"u8)) + { + operationId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new OperationStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("percentCompleted"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + percentCompleted = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("kind"u8)) + { + kind = new OperationKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("resourceLocation"u8)) + { + resourceLocation = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = DocumentIntelligenceError.DeserializeDocumentIntelligenceError(property.Value); + continue; + } + } + return new DocumentModelBuildOperationDetails(operationId, status, Optional.ToNullable(percentCompleted), createdDateTime, lastUpdatedDateTime, kind, resourceLocation, apiVersion.Value, Optional.ToDictionary(tags), error.Value, result.Value); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new DocumentModelBuildOperationDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentModelBuildOperationDetails(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelBuildOperationDetails.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelBuildOperationDetails.cs new file mode 100644 index 000000000000..bf5b8a5a85a0 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelBuildOperationDetails.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// Get Operation response object. + public partial class DocumentModelBuildOperationDetails : OperationDetails + { + /// Initializes a new instance of DocumentModelBuildOperationDetails. + /// Operation status. + /// Date and time (UTC) when the operation was created. + /// Date and time (UTC) when the status was last updated. + /// URL of the resource targeted by this operation. + /// is null. + internal DocumentModelBuildOperationDetails(OperationStatus status, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, Uri resourceLocation) : base(status, createdDateTime, lastUpdatedDateTime, resourceLocation) + { + Argument.AssertNotNull(resourceLocation, nameof(resourceLocation)); + + Kind = OperationKind.DocumentModelBuild; + } + + /// Initializes a new instance of DocumentModelBuildOperationDetails. + /// Operation ID. + /// Operation status. + /// Operation progress (0-100). + /// Date and time (UTC) when the operation was created. + /// Date and time (UTC) when the status was last updated. + /// Type of operation. + /// URL of the resource targeted by this operation. + /// API version used to create this operation. + /// List of key-value tag attributes associated with the document model. + /// Encountered error. + /// Operation result upon success. + internal DocumentModelBuildOperationDetails(Guid operationId, OperationStatus status, int? percentCompleted, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, OperationKind kind, Uri resourceLocation, string apiVersion, IReadOnlyDictionary tags, DocumentIntelligenceError error, DocumentModelDetails result) : base(operationId, status, percentCompleted, createdDateTime, lastUpdatedDateTime, kind, resourceLocation, apiVersion, tags, error) + { + Result = result; + } + + /// Operation result upon success. + public DocumentModelDetails Result { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelComposeOperationDetails.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelComposeOperationDetails.Serialization.cs new file mode 100644 index 000000000000..ce0da30cfb21 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelComposeOperationDetails.Serialization.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentModelComposeOperationDetails + { + internal static DocumentModelComposeOperationDetails DeserializeDocumentModelComposeOperationDetails(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional result = default; + Guid operationId = default; + OperationStatus status = default; + Optional percentCompleted = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + OperationKind kind = default; + Uri resourceLocation = default; + Optional apiVersion = default; + Optional> tags = default; + Optional error = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("result"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + result = DocumentModelDetails.DeserializeDocumentModelDetails(property.Value); + continue; + } + if (property.NameEquals("operationId"u8)) + { + operationId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new OperationStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("percentCompleted"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + percentCompleted = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("kind"u8)) + { + kind = new OperationKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("resourceLocation"u8)) + { + resourceLocation = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = DocumentIntelligenceError.DeserializeDocumentIntelligenceError(property.Value); + continue; + } + } + return new DocumentModelComposeOperationDetails(operationId, status, Optional.ToNullable(percentCompleted), createdDateTime, lastUpdatedDateTime, kind, resourceLocation, apiVersion.Value, Optional.ToDictionary(tags), error.Value, result.Value); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new DocumentModelComposeOperationDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentModelComposeOperationDetails(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelComposeOperationDetails.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelComposeOperationDetails.cs new file mode 100644 index 000000000000..69272c3a04d7 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelComposeOperationDetails.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// Get Operation response object. + public partial class DocumentModelComposeOperationDetails : OperationDetails + { + /// Initializes a new instance of DocumentModelComposeOperationDetails. + /// Operation status. + /// Date and time (UTC) when the operation was created. + /// Date and time (UTC) when the status was last updated. + /// URL of the resource targeted by this operation. + /// is null. + internal DocumentModelComposeOperationDetails(OperationStatus status, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, Uri resourceLocation) : base(status, createdDateTime, lastUpdatedDateTime, resourceLocation) + { + Argument.AssertNotNull(resourceLocation, nameof(resourceLocation)); + + Kind = OperationKind.DocumentModelCompose; + } + + /// Initializes a new instance of DocumentModelComposeOperationDetails. + /// Operation ID. + /// Operation status. + /// Operation progress (0-100). + /// Date and time (UTC) when the operation was created. + /// Date and time (UTC) when the status was last updated. + /// Type of operation. + /// URL of the resource targeted by this operation. + /// API version used to create this operation. + /// List of key-value tag attributes associated with the document model. + /// Encountered error. + /// Operation result upon success. + internal DocumentModelComposeOperationDetails(Guid operationId, OperationStatus status, int? percentCompleted, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, OperationKind kind, Uri resourceLocation, string apiVersion, IReadOnlyDictionary tags, DocumentIntelligenceError error, DocumentModelDetails result) : base(operationId, status, percentCompleted, createdDateTime, lastUpdatedDateTime, kind, resourceLocation, apiVersion, tags, error) + { + Result = result; + } + + /// Operation result upon success. + public DocumentModelDetails Result { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelCopyToOperationDetails.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelCopyToOperationDetails.Serialization.cs new file mode 100644 index 000000000000..690f85ce375e --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelCopyToOperationDetails.Serialization.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentModelCopyToOperationDetails + { + internal static DocumentModelCopyToOperationDetails DeserializeDocumentModelCopyToOperationDetails(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional result = default; + Guid operationId = default; + OperationStatus status = default; + Optional percentCompleted = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + OperationKind kind = default; + Uri resourceLocation = default; + Optional apiVersion = default; + Optional> tags = default; + Optional error = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("result"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + result = DocumentModelDetails.DeserializeDocumentModelDetails(property.Value); + continue; + } + if (property.NameEquals("operationId"u8)) + { + operationId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new OperationStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("percentCompleted"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + percentCompleted = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("kind"u8)) + { + kind = new OperationKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("resourceLocation"u8)) + { + resourceLocation = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = DocumentIntelligenceError.DeserializeDocumentIntelligenceError(property.Value); + continue; + } + } + return new DocumentModelCopyToOperationDetails(operationId, status, Optional.ToNullable(percentCompleted), createdDateTime, lastUpdatedDateTime, kind, resourceLocation, apiVersion.Value, Optional.ToDictionary(tags), error.Value, result.Value); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new DocumentModelCopyToOperationDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentModelCopyToOperationDetails(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelCopyToOperationDetails.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelCopyToOperationDetails.cs new file mode 100644 index 000000000000..5b63c1607dbc --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelCopyToOperationDetails.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// Get Operation response object. + public partial class DocumentModelCopyToOperationDetails : OperationDetails + { + /// Initializes a new instance of DocumentModelCopyToOperationDetails. + /// Operation status. + /// Date and time (UTC) when the operation was created. + /// Date and time (UTC) when the status was last updated. + /// URL of the resource targeted by this operation. + /// is null. + internal DocumentModelCopyToOperationDetails(OperationStatus status, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, Uri resourceLocation) : base(status, createdDateTime, lastUpdatedDateTime, resourceLocation) + { + Argument.AssertNotNull(resourceLocation, nameof(resourceLocation)); + + Kind = OperationKind.DocumentModelCopyTo; + } + + /// Initializes a new instance of DocumentModelCopyToOperationDetails. + /// Operation ID. + /// Operation status. + /// Operation progress (0-100). + /// Date and time (UTC) when the operation was created. + /// Date and time (UTC) when the status was last updated. + /// Type of operation. + /// URL of the resource targeted by this operation. + /// API version used to create this operation. + /// List of key-value tag attributes associated with the document model. + /// Encountered error. + /// Operation result upon success. + internal DocumentModelCopyToOperationDetails(Guid operationId, OperationStatus status, int? percentCompleted, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, OperationKind kind, Uri resourceLocation, string apiVersion, IReadOnlyDictionary tags, DocumentIntelligenceError error, DocumentModelDetails result) : base(operationId, status, percentCompleted, createdDateTime, lastUpdatedDateTime, kind, resourceLocation, apiVersion, tags, error) + { + Result = result; + } + + /// Operation result upon success. + public DocumentModelDetails Result { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelDetails.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelDetails.Serialization.cs new file mode 100644 index 000000000000..8fc9051718c5 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelDetails.Serialization.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentModelDetails + { + internal static DocumentModelDetails DeserializeDocumentModelDetails(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DocumentBuildMode buildMode = default; + Optional azureBlobSource = default; + Optional azureBlobFileListSource = default; + Optional> docTypes = default; + string modelId = default; + Optional description = default; + DateTimeOffset createdDateTime = default; + Optional expirationDateTime = default; + Optional apiVersion = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("buildMode"u8)) + { + buildMode = new DocumentBuildMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("azureBlobSource"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + azureBlobSource = AzureBlobContentSource.DeserializeAzureBlobContentSource(property.Value); + continue; + } + if (property.NameEquals("azureBlobFileListSource"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + azureBlobFileListSource = AzureBlobFileListContentSource.DeserializeAzureBlobFileListContentSource(property.Value); + continue; + } + if (property.NameEquals("docTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, DocumentTypeDetails.DeserializeDocumentTypeDetails(property0.Value)); + } + docTypes = dictionary; + continue; + } + if (property.NameEquals("modelId"u8)) + { + modelId = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("expirationDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + } + return new DocumentModelDetails(modelId, description.Value, createdDateTime, Optional.ToNullable(expirationDateTime), apiVersion.Value, Optional.ToDictionary(tags), buildMode, azureBlobSource.Value, azureBlobFileListSource.Value, Optional.ToDictionary(docTypes)); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new DocumentModelDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentModelDetails(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelDetails.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelDetails.cs new file mode 100644 index 000000000000..65245bd87f5b --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelDetails.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// Document model info. + public partial class DocumentModelDetails : DocumentModelSummary + { + /// Initializes a new instance of DocumentModelDetails. + /// Unique document model name. + /// Custom document model build mode. + /// is null. + internal DocumentModelDetails(string modelId, DocumentBuildMode buildMode) : base(modelId) + { + Argument.AssertNotNull(modelId, nameof(modelId)); + + BuildMode = buildMode; + DocTypes = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of DocumentModelDetails. + /// Unique document model name. + /// Document model description. + /// Date and time (UTC) when the document model was created. + /// Date and time (UTC) when the document model will expire. + /// API version used to create this document model. + /// List of key-value tag attributes associated with the document model. + /// Custom document model build mode. + /// + /// Azure Blob Storage location containing the training data. Either + /// azureBlobSource or azureBlobFileListSource must be specified. + /// + /// + /// Azure Blob Storage file list specifying the training data. Either + /// azureBlobSource or azureBlobFileListSource must be specified. + /// + /// Supported document types. + internal DocumentModelDetails(string modelId, string description, DateTimeOffset createdDateTime, DateTimeOffset? expirationDateTime, string apiVersion, IReadOnlyDictionary tags, DocumentBuildMode buildMode, AzureBlobContentSource azureBlobSource, AzureBlobFileListContentSource azureBlobFileListSource, IReadOnlyDictionary docTypes) : base(modelId, description, createdDateTime, expirationDateTime, apiVersion, tags) + { + BuildMode = buildMode; + AzureBlobSource = azureBlobSource; + AzureBlobFileListSource = azureBlobFileListSource; + DocTypes = docTypes; + } + + /// Custom document model build mode. + public DocumentBuildMode BuildMode { get; } + /// + /// Azure Blob Storage location containing the training data. Either + /// azureBlobSource or azureBlobFileListSource must be specified. + /// + public AzureBlobContentSource AzureBlobSource { get; } + /// + /// Azure Blob Storage file list specifying the training data. Either + /// azureBlobSource or azureBlobFileListSource must be specified. + /// + public AzureBlobFileListContentSource AzureBlobFileListSource { get; } + /// Supported document types. + public IReadOnlyDictionary DocTypes { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelSummary.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelSummary.Serialization.cs new file mode 100644 index 000000000000..58484299e03a --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelSummary.Serialization.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentModelSummary + { + internal static DocumentModelSummary DeserializeDocumentModelSummary(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string modelId = default; + Optional description = default; + DateTimeOffset createdDateTime = default; + Optional expirationDateTime = default; + Optional apiVersion = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("modelId"u8)) + { + modelId = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("expirationDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + } + return new DocumentModelSummary(modelId, description.Value, createdDateTime, Optional.ToNullable(expirationDateTime), apiVersion.Value, Optional.ToDictionary(tags)); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentModelSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentModelSummary(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelSummary.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelSummary.cs new file mode 100644 index 000000000000..2b8b6dc08e3c --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelSummary.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// Document model summary. + public partial class DocumentModelSummary + { + /// Initializes a new instance of DocumentModelSummary. + /// Unique document model name. + /// is null. + internal DocumentModelSummary(string modelId) + { + Argument.AssertNotNull(modelId, nameof(modelId)); + + ModelId = modelId; + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of DocumentModelSummary. + /// Unique document model name. + /// Document model description. + /// Date and time (UTC) when the document model was created. + /// Date and time (UTC) when the document model will expire. + /// API version used to create this document model. + /// List of key-value tag attributes associated with the document model. + internal DocumentModelSummary(string modelId, string description, DateTimeOffset createdDateTime, DateTimeOffset? expirationDateTime, string apiVersion, IReadOnlyDictionary tags) + { + ModelId = modelId; + Description = description; + CreatedDateTime = createdDateTime; + ExpirationDateTime = expirationDateTime; + ApiVersion = apiVersion; + Tags = tags; + } + + /// Unique document model name. + public string ModelId { get; } + /// Document model description. + public string Description { get; } + /// Date and time (UTC) when the document model was created. + public DateTimeOffset CreatedDateTime { get; } + /// Date and time (UTC) when the document model will expire. + public DateTimeOffset? ExpirationDateTime { get; } + /// API version used to create this document model. + public string ApiVersion { get; } + /// List of key-value tag attributes associated with the document model. + public IReadOnlyDictionary Tags { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentPage.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentPage.cs new file mode 100644 index 000000000000..af930b0ac8b9 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentPage.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// Content and layout elements extracted from a page from the input. + public partial class DocumentPage + { + /// Initializes a new instance of DocumentPage. + /// 1-based page number in the input document. + /// Location of the page in the reading order concatenated content. + /// is null. + internal DocumentPage(int pageNumber, IEnumerable spans) + { + Argument.AssertNotNull(spans, nameof(spans)); + + PageNumber = pageNumber; + Spans = spans.ToList(); + Words = new ChangeTrackingList(); + SelectionMarks = new ChangeTrackingList(); + Lines = new ChangeTrackingList(); + Barcodes = new ChangeTrackingList(); + Formulas = new ChangeTrackingList(); + } + + /// Initializes a new instance of DocumentPage. + /// 1-based page number in the input document. + /// + /// The general orientation of the content in clockwise direction, measured in + /// degrees between (-180, 180]. + /// + /// The width of the image/PDF in pixels/inches, respectively. + /// The height of the image/PDF in pixels/inches, respectively. + /// + /// The unit used by the width, height, and polygon properties. For images, the + /// unit is "pixel". For PDF, the unit is "inch". + /// + /// Location of the page in the reading order concatenated content. + /// Extracted words from the page. + /// Extracted selection marks from the page. + /// + /// Extracted lines from the page, potentially containing both textual and visual + /// elements. + /// + /// Extracted barcodes from the page. + /// Extracted formulas from the page. + internal DocumentPage(int pageNumber, float? angle, float? width, float? height, string unit, IReadOnlyList spans, IReadOnlyList words, IReadOnlyList selectionMarks, IReadOnlyList lines, IReadOnlyList barcodes, IReadOnlyList formulas) + { + PageNumber = pageNumber; + Angle = angle; + Width = width; + Height = height; + Unit = unit; + Spans = spans; + Words = words; + SelectionMarks = selectionMarks; + Lines = lines; + Barcodes = barcodes; + Formulas = formulas; + } + + /// 1-based page number in the input document. + public int PageNumber { get; } + /// + /// The general orientation of the content in clockwise direction, measured in + /// degrees between (-180, 180]. + /// + public float? Angle { get; } + /// The width of the image/PDF in pixels/inches, respectively. + public float? Width { get; } + /// The height of the image/PDF in pixels/inches, respectively. + public float? Height { get; } + /// + /// The unit used by the width, height, and polygon properties. For images, the + /// unit is "pixel". For PDF, the unit is "inch". + /// + public string Unit { get; } + /// Location of the page in the reading order concatenated content. + public IReadOnlyList Spans { get; } + /// Extracted words from the page. + public IReadOnlyList Words { get; } + /// Extracted selection marks from the page. + public IReadOnlyList SelectionMarks { get; } + /// + /// Extracted lines from the page, potentially containing both textual and visual + /// elements. + /// + public IReadOnlyList Lines { get; } + /// Extracted barcodes from the page. + public IReadOnlyList Barcodes { get; } + /// Extracted formulas from the page. + public IReadOnlyList Formulas { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentParagraph.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentParagraph.cs new file mode 100644 index 000000000000..d39bc709b6f1 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentParagraph.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// + /// A paragraph object consisting with contiguous lines generally with common + /// alignment and spacing. + /// + public partial class DocumentParagraph + { + /// Initializes a new instance of DocumentParagraph. + /// Concatenated content of the paragraph in reading order. + /// Location of the paragraph in the reading order concatenated content. + /// or is null. + internal DocumentParagraph(string content, IEnumerable spans) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(spans, nameof(spans)); + + Content = content; + BoundingRegions = new ChangeTrackingList(); + Spans = spans.ToList(); + } + + /// Initializes a new instance of DocumentParagraph. + /// Semantic role of the paragraph. + /// Concatenated content of the paragraph in reading order. + /// Bounding regions covering the paragraph. + /// Location of the paragraph in the reading order concatenated content. + internal DocumentParagraph(string role, string content, IReadOnlyList boundingRegions, IReadOnlyList spans) + { + Role = role; + Content = content; + BoundingRegions = boundingRegions; + Spans = spans; + } + + /// Semantic role of the paragraph. + public string Role { get; } + /// Concatenated content of the paragraph in reading order. + public string Content { get; } + /// Bounding regions covering the paragraph. + public IReadOnlyList BoundingRegions { get; } + /// Location of the paragraph in the reading order concatenated content. + public IReadOnlyList Spans { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSection.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSection.cs new file mode 100644 index 000000000000..0357da6e9d36 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSection.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// An object representing a section in the document. + public partial class DocumentSection + { + /// Initializes a new instance of DocumentSection. + /// Location of the section in the reading order concatenated content. + /// is null. + internal DocumentSection(IEnumerable spans) + { + Argument.AssertNotNull(spans, nameof(spans)); + + Spans = spans.ToList(); + Elements = new ChangeTrackingList(); + } + + /// Initializes a new instance of DocumentSection. + /// Location of the section in the reading order concatenated content. + /// Child elements of the section. + internal DocumentSection(IReadOnlyList spans, IReadOnlyList elements) + { + Spans = spans; + Elements = elements; + } + + /// Location of the section in the reading order concatenated content. + public IReadOnlyList Spans { get; } + /// Child elements of the section. + public IReadOnlyList Elements { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSelectionMark.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSelectionMark.cs new file mode 100644 index 000000000000..a1785e7c8b69 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSelectionMark.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// + /// A selection mark object representing check boxes, radio buttons, and other + /// elements indicating a selection. + /// + public partial class DocumentSelectionMark + { + /// Initializes a new instance of DocumentSelectionMark. + /// State of the selection mark. + /// Location of the selection mark in the reading order concatenated content. + /// Confidence of correctly extracting the selection mark. + /// or is null. + internal DocumentSelectionMark(string state, DocumentSpan span, float confidence) + { + Argument.AssertNotNull(state, nameof(state)); + Argument.AssertNotNull(span, nameof(span)); + + State = state; + Polygon = new ChangeTrackingList(); + Span = span; + Confidence = confidence; + } + + /// Initializes a new instance of DocumentSelectionMark. + /// State of the selection mark. + /// + /// Bounding polygon of the selection mark, with coordinates specified relative + /// to the top-left of the page. The numbers represent the x, y values of the + /// polygon vertices, clockwise from the left (-180 degrees inclusive) relative + /// to the element orientation. + /// + /// Location of the selection mark in the reading order concatenated content. + /// Confidence of correctly extracting the selection mark. + internal DocumentSelectionMark(string state, IReadOnlyList polygon, DocumentSpan span, float confidence) + { + State = state; + Polygon = polygon; + Span = span; + Confidence = confidence; + } + + /// State of the selection mark. + public string State { get; } + /// + /// Bounding polygon of the selection mark, with coordinates specified relative + /// to the top-left of the page. The numbers represent the x, y values of the + /// polygon vertices, clockwise from the left (-180 degrees inclusive) relative + /// to the element orientation. + /// + public IReadOnlyList Polygon { get; } + /// Location of the selection mark in the reading order concatenated content. + public DocumentSpan Span { get; } + /// Confidence of correctly extracting the selection mark. + public float Confidence { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSpan.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSpan.cs new file mode 100644 index 000000000000..dd1f9457fd27 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSpan.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.AI.DocumentIntelligence +{ + /// + /// Contiguous region of the concatenated content property, specified as an offset + /// and length. + /// + public partial class DocumentSpan + { + /// Initializes a new instance of DocumentSpan. + /// Zero-based index of the content represented by the span. + /// Number of characters in the content represented by the span. + internal DocumentSpan(int offset, int length) + { + Offset = offset; + Length = length; + } + + /// Zero-based index of the content represented by the span. + public int Offset { get; } + /// Number of characters in the content represented by the span. + public int Length { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentStyle.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentStyle.cs new file mode 100644 index 000000000000..e1b382c438fc --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentStyle.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// An object representing observed text styles. + public partial class DocumentStyle + { + /// Initializes a new instance of DocumentStyle. + /// Location of the text elements in the concatenated content the style applies to. + /// Confidence of correctly identifying the style. + /// is null. + internal DocumentStyle(IEnumerable spans, float confidence) + { + Argument.AssertNotNull(spans, nameof(spans)); + + Spans = spans.ToList(); + Confidence = confidence; + } + + /// Initializes a new instance of DocumentStyle. + /// Is content handwritten?. + /// + /// Visually most similar font from among the set of supported font families, with + /// fallback fonts following CSS convention (ex. 'Arial, sans-serif'). + /// + /// Font style. + /// Font weight. + /// Foreground color in #rrggbb hexadecimal format. + /// Background color in #rrggbb hexadecimal format.. + /// Location of the text elements in the concatenated content the style applies to. + /// Confidence of correctly identifying the style. + internal DocumentStyle(bool? isHandwritten, string similarFontFamily, string fontStyle, string fontWeight, string color, string backgroundColor, IReadOnlyList spans, float confidence) + { + IsHandwritten = isHandwritten; + SimilarFontFamily = similarFontFamily; + FontStyle = fontStyle; + FontWeight = fontWeight; + Color = color; + BackgroundColor = backgroundColor; + Spans = spans; + Confidence = confidence; + } + + /// Is content handwritten?. + public bool? IsHandwritten { get; } + /// + /// Visually most similar font from among the set of supported font families, with + /// fallback fonts following CSS convention (ex. 'Arial, sans-serif'). + /// + public string SimilarFontFamily { get; } + /// Font style. + public string FontStyle { get; } + /// Font weight. + public string FontWeight { get; } + /// Foreground color in #rrggbb hexadecimal format. + public string Color { get; } + /// Background color in #rrggbb hexadecimal format.. + public string BackgroundColor { get; } + /// Location of the text elements in the concatenated content the style applies to. + public IReadOnlyList Spans { get; } + /// Confidence of correctly identifying the style. + public float Confidence { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTable.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTable.cs new file mode 100644 index 000000000000..ab3ef9cca11e --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTable.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// A table object consisting table cells arranged in a rectangular layout. + public partial class DocumentTable + { + /// Initializes a new instance of DocumentTable. + /// Number of rows in the table. + /// Number of columns in the table. + /// Cells contained within the table. + /// Location of the table in the reading order concatenated content. + /// or is null. + internal DocumentTable(int rowCount, int columnCount, IEnumerable cells, IEnumerable spans) + { + Argument.AssertNotNull(cells, nameof(cells)); + Argument.AssertNotNull(spans, nameof(spans)); + + RowCount = rowCount; + ColumnCount = columnCount; + Cells = cells.ToList(); + BoundingRegions = new ChangeTrackingList(); + Spans = spans.ToList(); + Footnotes = new ChangeTrackingList(); + } + + /// Initializes a new instance of DocumentTable. + /// Number of rows in the table. + /// Number of columns in the table. + /// Cells contained within the table. + /// Bounding regions covering the table. + /// Location of the table in the reading order concatenated content. + /// Caption associated with the table. + /// List of footnotes associated with the table. + internal DocumentTable(int rowCount, int columnCount, IReadOnlyList cells, IReadOnlyList boundingRegions, IReadOnlyList spans, DocumentCaption caption, IReadOnlyList footnotes) + { + RowCount = rowCount; + ColumnCount = columnCount; + Cells = cells; + BoundingRegions = boundingRegions; + Spans = spans; + Caption = caption; + Footnotes = footnotes; + } + + /// Number of rows in the table. + public int RowCount { get; } + /// Number of columns in the table. + public int ColumnCount { get; } + /// Cells contained within the table. + public IReadOnlyList Cells { get; } + /// Bounding regions covering the table. + public IReadOnlyList BoundingRegions { get; } + /// Location of the table in the reading order concatenated content. + public IReadOnlyList Spans { get; } + /// Caption associated with the table. + public DocumentCaption Caption { get; } + /// List of footnotes associated with the table. + public IReadOnlyList Footnotes { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTableCell.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTableCell.cs new file mode 100644 index 000000000000..2bdf60ff577e --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTableCell.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// An object representing the location and content of a table cell. + public partial class DocumentTableCell + { + /// Initializes a new instance of DocumentTableCell. + /// Row index of the cell. + /// Column index of the cell. + /// Concatenated content of the table cell in reading order. + /// Location of the table cell in the reading order concatenated content. + /// or is null. + internal DocumentTableCell(int rowIndex, int columnIndex, string content, IEnumerable spans) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(spans, nameof(spans)); + + RowIndex = rowIndex; + ColumnIndex = columnIndex; + Content = content; + BoundingRegions = new ChangeTrackingList(); + Spans = spans.ToList(); + Elements = new ChangeTrackingList(); + } + + /// Initializes a new instance of DocumentTableCell. + /// Table cell kind. + /// Row index of the cell. + /// Column index of the cell. + /// Number of rows spanned by this cell. + /// Number of columns spanned by this cell. + /// Concatenated content of the table cell in reading order. + /// Bounding regions covering the table cell. + /// Location of the table cell in the reading order concatenated content. + /// Child elements of the table cell. + internal DocumentTableCell(string kind, int rowIndex, int columnIndex, int? rowSpan, int? columnSpan, string content, IReadOnlyList boundingRegions, IReadOnlyList spans, IReadOnlyList elements) + { + Kind = kind; + RowIndex = rowIndex; + ColumnIndex = columnIndex; + RowSpan = rowSpan; + ColumnSpan = columnSpan; + Content = content; + BoundingRegions = boundingRegions; + Spans = spans; + Elements = elements; + } + + /// Table cell kind. + public string Kind { get; } + /// Row index of the cell. + public int RowIndex { get; } + /// Column index of the cell. + public int ColumnIndex { get; } + /// Number of rows spanned by this cell. + public int? RowSpan { get; } + /// Number of columns spanned by this cell. + public int? ColumnSpan { get; } + /// Concatenated content of the table cell in reading order. + public string Content { get; } + /// Bounding regions covering the table cell. + public IReadOnlyList BoundingRegions { get; } + /// Location of the table cell in the reading order concatenated content. + public IReadOnlyList Spans { get; } + /// Child elements of the table cell. + public IReadOnlyList Elements { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTypeDetails.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTypeDetails.Serialization.cs new file mode 100644 index 000000000000..0845c14c723a --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTypeDetails.Serialization.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentTypeDetails + { + internal static DocumentTypeDetails DeserializeDocumentTypeDetails(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional description = default; + Optional buildMode = default; + IReadOnlyDictionary fieldSchema = default; + Optional> fieldConfidence = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("buildMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + buildMode = new DocumentBuildMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("fieldSchema"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, DocumentFieldSchema.DeserializeDocumentFieldSchema(property0.Value)); + } + fieldSchema = dictionary; + continue; + } + if (property.NameEquals("fieldConfidence"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetSingle()); + } + fieldConfidence = dictionary; + continue; + } + } + return new DocumentTypeDetails(description.Value, Optional.ToNullable(buildMode), fieldSchema, Optional.ToDictionary(fieldConfidence)); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentTypeDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentTypeDetails(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTypeDetails.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTypeDetails.cs new file mode 100644 index 000000000000..3a9aac470c6f --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTypeDetails.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// Document type info. + public partial class DocumentTypeDetails + { + /// Initializes a new instance of DocumentTypeDetails. + /// Description of the document semantic schema using a JSON Schema style syntax. + /// is null. + internal DocumentTypeDetails(IReadOnlyDictionary fieldSchema) + { + Argument.AssertNotNull(fieldSchema, nameof(fieldSchema)); + + FieldSchema = fieldSchema; + FieldConfidence = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of DocumentTypeDetails. + /// Document model description. + /// Custom document model build mode. + /// Description of the document semantic schema using a JSON Schema style syntax. + /// Estimated confidence for each field. + internal DocumentTypeDetails(string description, DocumentBuildMode? buildMode, IReadOnlyDictionary fieldSchema, IReadOnlyDictionary fieldConfidence) + { + Description = description; + BuildMode = buildMode; + FieldSchema = fieldSchema; + FieldConfidence = fieldConfidence; + } + + /// Document model description. + public string Description { get; } + /// Custom document model build mode. + public DocumentBuildMode? BuildMode { get; } + /// Description of the document semantic schema using a JSON Schema style syntax. + public IReadOnlyDictionary FieldSchema { get; } + /// Estimated confidence for each field. + public IReadOnlyDictionary FieldConfidence { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentWord.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentWord.cs new file mode 100644 index 000000000000..27a90931b026 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentWord.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// + /// A word object consisting of a contiguous sequence of characters. For non-space + /// delimited languages, such as Chinese, Japanese, and Korean, each character is + /// represented as its own word. + /// + public partial class DocumentWord + { + /// Initializes a new instance of DocumentWord. + /// Text content of the word. + /// Location of the word in the reading order concatenated content. + /// Confidence of correctly extracting the word. + /// or is null. + internal DocumentWord(string content, DocumentSpan span, float confidence) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(span, nameof(span)); + + Content = content; + Polygon = new ChangeTrackingList(); + Span = span; + Confidence = confidence; + } + + /// Initializes a new instance of DocumentWord. + /// Text content of the word. + /// + /// Bounding polygon of the word, with coordinates specified relative to the + /// top-left of the page. The numbers represent the x, y values of the polygon + /// vertices, clockwise from the left (-180 degrees inclusive) relative to the + /// element orientation. + /// + /// Location of the word in the reading order concatenated content. + /// Confidence of correctly extracting the word. + internal DocumentWord(string content, IReadOnlyList polygon, DocumentSpan span, float confidence) + { + Content = content; + Polygon = polygon; + Span = span; + Confidence = confidence; + } + + /// Text content of the word. + public string Content { get; } + /// + /// Bounding polygon of the word, with coordinates specified relative to the + /// top-left of the page. The numbers represent the x, y values of the polygon + /// vertices, clockwise from the left (-180 degrees inclusive) relative to the + /// element orientation. + /// + public IReadOnlyList Polygon { get; } + /// Location of the word in the reading order concatenated content. + public DocumentSpan Span { get; } + /// Confidence of correctly extracting the word. + public float Confidence { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/InnerError.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/InnerError.Serialization.cs new file mode 100644 index 000000000000..e837116137e6 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/InnerError.Serialization.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class InnerError + { + internal static InnerError DeserializeInnerError(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string code = default; + Optional message = default; + Optional innererror = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("innererror"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + innererror = DeserializeInnerError(property.Value); + continue; + } + } + return new InnerError(code, message.Value, innererror.Value); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static InnerError FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeInnerError(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/InnerError.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/InnerError.cs new file mode 100644 index 000000000000..656e62d12a85 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/InnerError.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// Detailed error. + public partial class InnerError + { + /// Initializes a new instance of InnerError. + /// Error code. + /// is null. + internal InnerError(string code) + { + Argument.AssertNotNull(code, nameof(code)); + + Code = code; + } + + /// Initializes a new instance of InnerError. + /// Error code. + /// Error message. + /// Detailed error. + internal InnerError(string code, string message, InnerError innererror) + { + Code = code; + Message = message; + Innererror = innererror; + } + + /// Error code. + public string Code { get; } + /// Error message. + public string Message { get; } + /// Detailed error. + public InnerError Innererror { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationDetails.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationDetails.Serialization.cs new file mode 100644 index 000000000000..3b6cdbdf63b8 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationDetails.Serialization.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class OperationDetails + { + internal static OperationDetails DeserializeOperationDetails(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("kind", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "documentModelBuild": return DocumentModelBuildOperationDetails.DeserializeDocumentModelBuildOperationDetails(element); + case "documentModelCompose": return DocumentModelComposeOperationDetails.DeserializeDocumentModelComposeOperationDetails(element); + case "documentModelCopyTo": return DocumentModelCopyToOperationDetails.DeserializeDocumentModelCopyToOperationDetails(element); + case "documentClassifierBuild": return DocumentClassifierBuildOperationDetails.DeserializeDocumentClassifierBuildOperationDetails(element); + case "chatBuild": return ChatIndexBuildOperationDetails.DeserializeChatIndexBuildOperationDetails(element); + } + } + return UnknownOperationDetails.DeserializeUnknownOperationDetails(element); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static OperationDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeOperationDetails(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationDetails.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationDetails.cs new file mode 100644 index 000000000000..825fc628f234 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationDetails.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// + /// Get Operation response object. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , and . + /// + public abstract partial class OperationDetails + { + /// Initializes a new instance of OperationDetails. + /// Operation status. + /// Date and time (UTC) when the operation was created. + /// Date and time (UTC) when the status was last updated. + /// URL of the resource targeted by this operation. + /// is null. + protected OperationDetails(OperationStatus status, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, Uri resourceLocation) + { + Argument.AssertNotNull(resourceLocation, nameof(resourceLocation)); + + Status = status; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ResourceLocation = resourceLocation; + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of OperationDetails. + /// Operation ID. + /// Operation status. + /// Operation progress (0-100). + /// Date and time (UTC) when the operation was created. + /// Date and time (UTC) when the status was last updated. + /// Type of operation. + /// URL of the resource targeted by this operation. + /// API version used to create this operation. + /// List of key-value tag attributes associated with the document model. + /// Encountered error. + internal OperationDetails(Guid operationId, OperationStatus status, int? percentCompleted, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, OperationKind kind, Uri resourceLocation, string apiVersion, IReadOnlyDictionary tags, DocumentIntelligenceError error) + { + OperationId = operationId; + Status = status; + PercentCompleted = percentCompleted; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Kind = kind; + ResourceLocation = resourceLocation; + ApiVersion = apiVersion; + Tags = tags; + Error = error; + } + + /// Operation ID. + public Guid OperationId { get; } + /// Operation status. + public OperationStatus Status { get; } + /// Operation progress (0-100). + public int? PercentCompleted { get; } + /// Date and time (UTC) when the operation was created. + public DateTimeOffset CreatedDateTime { get; } + /// Date and time (UTC) when the status was last updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// Type of operation. + internal OperationKind Kind { get; set; } + /// URL of the resource targeted by this operation. + public Uri ResourceLocation { get; } + /// API version used to create this operation. + public string ApiVersion { get; } + /// List of key-value tag attributes associated with the document model. + public IReadOnlyDictionary Tags { get; } + /// Encountered error. + public DocumentIntelligenceError Error { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationKind.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationKind.cs new file mode 100644 index 000000000000..6f94849bf70b --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationKind.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.DocumentIntelligence +{ + /// Type of operation. + public readonly partial struct OperationKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public OperationKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DocumentModelBuildValue = "documentModelBuild"; + private const string DocumentModelComposeValue = "documentModelCompose"; + private const string DocumentModelCopyToValue = "documentModelCopyTo"; + private const string DocumentClassifierBuildValue = "documentClassifierBuild"; + private const string ChatBuildValue = "chatBuild"; + + /// Build a new custom document model. + public static OperationKind DocumentModelBuild { get; } = new OperationKind(DocumentModelBuildValue); + /// Compose a new custom document model from existing models. + public static OperationKind DocumentModelCompose { get; } = new OperationKind(DocumentModelComposeValue); + /// + /// Copy an existing document model to potentially a different resource, region, or + /// subscription. + /// + public static OperationKind DocumentModelCopyTo { get; } = new OperationKind(DocumentModelCopyToValue); + /// Build a new custom classifier model. + public static OperationKind DocumentClassifierBuild { get; } = new OperationKind(DocumentClassifierBuildValue); + /// Build a new chat index. + public static OperationKind ChatBuild { get; } = new OperationKind(ChatBuildValue); + /// Determines if two values are the same. + public static bool operator ==(OperationKind left, OperationKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OperationKind left, OperationKind right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator OperationKind(string value) => new OperationKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OperationKind other && Equals(other); + /// + public bool Equals(OperationKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationStatus.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationStatus.cs new file mode 100644 index 000000000000..5f26f496fce1 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationStatus.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.DocumentIntelligence +{ + /// Operation status. + public readonly partial struct OperationStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public OperationStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotStartedValue = "notStarted"; + private const string RunningValue = "running"; + private const string FailedValue = "failed"; + private const string SucceededValue = "succeeded"; + private const string CanceledValue = "canceled"; + + /// The operation has not started yet. + public static OperationStatus NotStarted { get; } = new OperationStatus(NotStartedValue); + /// The operation is in progress. + public static OperationStatus Running { get; } = new OperationStatus(RunningValue); + /// The operation has failed. + public static OperationStatus Failed { get; } = new OperationStatus(FailedValue); + /// The operation has succeeded. + public static OperationStatus Succeeded { get; } = new OperationStatus(SucceededValue); + /// The operation has been canceled. + public static OperationStatus Canceled { get; } = new OperationStatus(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(OperationStatus left, OperationStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OperationStatus left, OperationStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator OperationStatus(string value) => new OperationStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OperationStatus other && Equals(other); + /// + public bool Equals(OperationStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationSummary.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationSummary.Serialization.cs new file mode 100644 index 000000000000..ce6939253507 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationSummary.Serialization.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class OperationSummary + { + internal static OperationSummary DeserializeOperationSummary(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Guid operationId = default; + OperationStatus status = default; + Optional percentCompleted = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + OperationKind kind = default; + Uri resourceLocation = default; + Optional apiVersion = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("operationId"u8)) + { + operationId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new OperationStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("percentCompleted"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + percentCompleted = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("kind"u8)) + { + kind = new OperationKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("resourceLocation"u8)) + { + resourceLocation = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + } + return new OperationSummary(operationId, status, Optional.ToNullable(percentCompleted), createdDateTime, lastUpdatedDateTime, kind, resourceLocation, apiVersion.Value, Optional.ToDictionary(tags)); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static OperationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeOperationSummary(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationSummary.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationSummary.cs new file mode 100644 index 000000000000..5b66bd24c862 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationSummary.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// Operation info. + public partial class OperationSummary + { + /// Initializes a new instance of OperationSummary. + /// Operation ID. + /// Operation status. + /// Date and time (UTC) when the operation was created. + /// Date and time (UTC) when the status was last updated. + /// Type of operation. + /// URL of the resource targeted by this operation. + /// is null. + internal OperationSummary(Guid operationId, OperationStatus status, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, OperationKind kind, Uri resourceLocation) + { + Argument.AssertNotNull(resourceLocation, nameof(resourceLocation)); + + OperationId = operationId; + Status = status; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Kind = kind; + ResourceLocation = resourceLocation; + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of OperationSummary. + /// Operation ID. + /// Operation status. + /// Operation progress (0-100). + /// Date and time (UTC) when the operation was created. + /// Date and time (UTC) when the status was last updated. + /// Type of operation. + /// URL of the resource targeted by this operation. + /// API version used to create this operation. + /// List of key-value tag attributes associated with the document model. + internal OperationSummary(Guid operationId, OperationStatus status, int? percentCompleted, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, OperationKind kind, Uri resourceLocation, string apiVersion, IReadOnlyDictionary tags) + { + OperationId = operationId; + Status = status; + PercentCompleted = percentCompleted; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Kind = kind; + ResourceLocation = resourceLocation; + ApiVersion = apiVersion; + Tags = tags; + } + + /// Operation ID. + public Guid OperationId { get; } + /// Operation status. + public OperationStatus Status { get; } + /// Operation progress (0-100). + public int? PercentCompleted { get; } + /// Date and time (UTC) when the operation was created. + public DateTimeOffset CreatedDateTime { get; } + /// Date and time (UTC) when the status was last updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// Type of operation. + public OperationKind Kind { get; } + /// URL of the resource targeted by this operation. + public Uri ResourceLocation { get; } + /// API version used to create this operation. + public string ApiVersion { get; } + /// List of key-value tag attributes associated with the document model. + public IReadOnlyDictionary Tags { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/QuotaDetails.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/QuotaDetails.Serialization.cs new file mode 100644 index 000000000000..3a0cd92c5c89 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/QuotaDetails.Serialization.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class QuotaDetails + { + internal static QuotaDetails DeserializeQuotaDetails(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int used = default; + int quota = default; + DateTimeOffset quotaResetDateTime = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("used"u8)) + { + used = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("quota"u8)) + { + quota = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("quotaResetDateTime"u8)) + { + quotaResetDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + } + return new QuotaDetails(used, quota, quotaResetDateTime); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static QuotaDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeQuotaDetails(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/QuotaDetails.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/QuotaDetails.cs new file mode 100644 index 000000000000..db023afbf932 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/QuotaDetails.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.AI.DocumentIntelligence +{ + /// Quota used, limit, and next reset date/time. + public partial class QuotaDetails + { + /// Initializes a new instance of QuotaDetails. + /// Amount of the resource quota used. + /// Resource quota limit. + /// Date/time when the resource quota usage will be reset. + internal QuotaDetails(int used, int quota, DateTimeOffset quotaResetDateTime) + { + Used = used; + Quota = quota; + QuotaResetDateTime = quotaResetDateTime; + } + + /// Amount of the resource quota used. + public int Used { get; } + /// Resource quota limit. + public int Quota { get; } + /// Date/time when the resource quota usage will be reset. + public DateTimeOffset QuotaResetDateTime { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ResourceDetails.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ResourceDetails.Serialization.cs new file mode 100644 index 000000000000..d932193d8ed9 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ResourceDetails.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class ResourceDetails + { + internal static ResourceDetails DeserializeResourceDetails(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CustomDocumentModelsDetails customDocumentModels = default; + QuotaDetails customNeuralDocumentModelBuilds = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("customDocumentModels"u8)) + { + customDocumentModels = CustomDocumentModelsDetails.DeserializeCustomDocumentModelsDetails(property.Value); + continue; + } + if (property.NameEquals("customNeuralDocumentModelBuilds"u8)) + { + customNeuralDocumentModelBuilds = QuotaDetails.DeserializeQuotaDetails(property.Value); + continue; + } + } + return new ResourceDetails(customDocumentModels, customNeuralDocumentModelBuilds); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ResourceDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeResourceDetails(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ResourceDetails.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ResourceDetails.cs new file mode 100644 index 000000000000..7c7f9ccea1ea --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ResourceDetails.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// General information regarding the current resource. + public partial class ResourceDetails + { + /// Initializes a new instance of ResourceDetails. + /// Details regarding custom document models. + /// Quota used, limit, and next reset date/time. + /// or is null. + internal ResourceDetails(CustomDocumentModelsDetails customDocumentModels, QuotaDetails customNeuralDocumentModelBuilds) + { + Argument.AssertNotNull(customDocumentModels, nameof(customDocumentModels)); + Argument.AssertNotNull(customNeuralDocumentModelBuilds, nameof(customNeuralDocumentModelBuilds)); + + CustomDocumentModels = customDocumentModels; + CustomNeuralDocumentModelBuilds = customNeuralDocumentModelBuilds; + } + + /// Details regarding custom document models. + public CustomDocumentModelsDetails CustomDocumentModels { get; } + /// Quota used, limit, and next reset date/time. + public QuotaDetails CustomNeuralDocumentModelBuilds { get; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/SplitMode.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/SplitMode.cs new file mode 100644 index 000000000000..a14a683534eb --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/SplitMode.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.DocumentIntelligence +{ + /// Document splitting mode. + public readonly partial struct SplitMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SplitMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AutoValue = "auto"; + private const string NoneValue = "none"; + private const string PerPageValue = "perPage"; + + /// Automatically split file into documents. + public static SplitMode Auto { get; } = new SplitMode(AutoValue); + /// Treat the entire file as a single document. + public static SplitMode None { get; } = new SplitMode(NoneValue); + /// Treat each page in the file as a separate document. + public static SplitMode PerPage { get; } = new SplitMode(PerPageValue); + /// Determines if two values are the same. + public static bool operator ==(SplitMode left, SplitMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SplitMode left, SplitMode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SplitMode(string value) => new SplitMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SplitMode other && Equals(other); + /// + public bool Equals(SplitMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/StringIndexType.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/StringIndexType.cs new file mode 100644 index 000000000000..a73b218696c7 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/StringIndexType.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.DocumentIntelligence +{ + /// Method used to compute string offset and length. + public readonly partial struct StringIndexType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public StringIndexType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TextElementsValue = "textElements"; + private const string UnicodeCodePointValue = "unicodeCodePoint"; + private const string Utf16CodeUnitValue = "utf16CodeUnit"; + + /// + /// User-perceived display character, or grapheme cluster, as defined by Unicode + /// 8.0.0. + /// + public static StringIndexType TextElements { get; } = new StringIndexType(TextElementsValue); + /// Character unit represented by a single unicode code point. Used by Python 3. + public static StringIndexType UnicodeCodePoint { get; } = new StringIndexType(UnicodeCodePointValue); + /// + /// Character unit represented by a 16-bit Unicode code unit. Used by JavaScript, + /// Java, and .NET. + /// + public static StringIndexType Utf16CodeUnit { get; } = new StringIndexType(Utf16CodeUnitValue); + /// Determines if two values are the same. + public static bool operator ==(StringIndexType left, StringIndexType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(StringIndexType left, StringIndexType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator StringIndexType(string value) => new StringIndexType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is StringIndexType other && Equals(other); + /// + public bool Equals(StringIndexType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/UnknownOperationDetails.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/UnknownOperationDetails.Serialization.cs new file mode 100644 index 000000000000..14758d28cdad --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/UnknownOperationDetails.Serialization.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + internal partial class UnknownOperationDetails + { + internal static UnknownOperationDetails DeserializeUnknownOperationDetails(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Guid operationId = default; + OperationStatus status = default; + Optional percentCompleted = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + OperationKind kind = "Unknown"; + Uri resourceLocation = default; + Optional apiVersion = default; + Optional> tags = default; + Optional error = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("operationId"u8)) + { + operationId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new OperationStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("percentCompleted"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + percentCompleted = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("kind"u8)) + { + kind = new OperationKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("resourceLocation"u8)) + { + resourceLocation = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = DocumentIntelligenceError.DeserializeDocumentIntelligenceError(property.Value); + continue; + } + } + return new UnknownOperationDetails(operationId, status, Optional.ToNullable(percentCompleted), createdDateTime, lastUpdatedDateTime, kind, resourceLocation, apiVersion.Value, Optional.ToDictionary(tags), error.Value); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new UnknownOperationDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUnknownOperationDetails(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/UnknownOperationDetails.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/UnknownOperationDetails.cs new file mode 100644 index 000000000000..24b94edd7bf6 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/UnknownOperationDetails.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + /// Unknown version of OperationDetails. + internal partial class UnknownOperationDetails : OperationDetails + { + /// Initializes a new instance of UnknownOperationDetails. + /// Operation status. + /// Date and time (UTC) when the operation was created. + /// Date and time (UTC) when the status was last updated. + /// URL of the resource targeted by this operation. + /// is null. + internal UnknownOperationDetails(OperationStatus status, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, Uri resourceLocation) : base(status, createdDateTime, lastUpdatedDateTime, resourceLocation) + { + Argument.AssertNotNull(resourceLocation, nameof(resourceLocation)); + } + + /// Initializes a new instance of UnknownOperationDetails. + /// Operation ID. + /// Operation status. + /// Operation progress (0-100). + /// Date and time (UTC) when the operation was created. + /// Date and time (UTC) when the status was last updated. + /// Type of operation. + /// URL of the resource targeted by this operation. + /// API version used to create this operation. + /// List of key-value tag attributes associated with the document model. + /// Encountered error. + internal UnknownOperationDetails(Guid operationId, OperationStatus status, int? percentCompleted, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, OperationKind kind, Uri resourceLocation, string apiVersion, IReadOnlyDictionary tags, DocumentIntelligenceError error) : base(operationId, status, percentCompleted, createdDateTime, lastUpdatedDateTime, kind, resourceLocation, apiVersion, tags, error) + { + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Properties/AssemblyInfo.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..08aefdb8ea8f --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Properties/AssemblyInfo.cs @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Azure.AI.DocumentIntelligence.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] +[assembly: Azure.Core.AzureResourceProviderNamespace("Microsoft.CognitiveServices")] diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Azure.AI.DocumentIntelligence.Tests.csproj b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Azure.AI.DocumentIntelligence.Tests.csproj new file mode 100644 index 000000000000..926052652396 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Azure.AI.DocumentIntelligence.Tests.csproj @@ -0,0 +1,25 @@ + + + $(RequiredTargetFrameworks) + + + $(NoWarn);CS1591 + + + + + + + + + + + + + + + + + + + diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Generated/Samples/Samples_DocumentAnalysisClient.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Generated/Samples/Samples_DocumentAnalysisClient.cs new file mode 100644 index 000000000000..040217ef026d --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Generated/Samples/Samples_DocumentAnalysisClient.cs @@ -0,0 +1,1103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading.Tasks; +using Azure; +using Azure.AI.DocumentIntelligence; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.AI.DocumentIntelligence.Samples +{ + public partial class Samples_DocumentAnalysisClient + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeDocument_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + + using RequestContent content = null; + Operation operation = client.AnalyzeDocument(WaitUntil.Completed, "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("stringIndexType").ToString()); + Console.WriteLine(result.GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeDocument_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + + using RequestContent content = null; + Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("stringIndexType").ToString()); + Console.WriteLine(result.GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeDocument_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + + Operation operation = client.AnalyzeDocument(WaitUntil.Completed, ""); + AnalyzeResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeDocument_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + + Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, ""); + AnalyzeResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeDocument_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + urlSource = "http://localhost:3000", + base64Source = new object(), + }); + Operation operation = client.AnalyzeDocument(WaitUntil.Completed, "", content, pages: "", locale: "", stringIndexType: "textElements", features: new DocumentAnalysisFeature[] { DocumentAnalysisFeature.OcrHighResolution }, queryFields: new string[] { "" }, outputContentFormat: "text"); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("stringIndexType").ToString()); + Console.WriteLine(result.GetProperty("contentFormat").ToString()); + Console.WriteLine(result.GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("angle").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("width").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("height").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("role").ToString()); + Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("rowCount").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("columnCount").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowIndex").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnIndex").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowSpan").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnSpan").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("level").ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("sections")[0].GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("isHandwritten").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("similarFontFamily").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontStyle").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontWeight").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("color").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("backgroundColor").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("languages")[0].GetProperty("locale").ToString()); + Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("languages")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("docType").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueString").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueDate").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueTime").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valuePhoneNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueInteger").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSelectionMark").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSignature").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCountryRegion").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueString").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueDate").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueTime").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valuePhoneNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueInteger").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionMark").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSignature").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCountryRegion").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("amount").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("houseNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("poBox").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("road").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("city").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("postalCode").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("countryRegion").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("streetAddress").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("suburb").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("house").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("level").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueBoolean").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueBoolean").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("confidence").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeDocument_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + urlSource = "http://localhost:3000", + base64Source = new object(), + }); + Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "", content, pages: "", locale: "", stringIndexType: "textElements", features: new DocumentAnalysisFeature[] { DocumentAnalysisFeature.OcrHighResolution }, queryFields: new string[] { "" }, outputContentFormat: "text"); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("stringIndexType").ToString()); + Console.WriteLine(result.GetProperty("contentFormat").ToString()); + Console.WriteLine(result.GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("angle").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("width").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("height").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("role").ToString()); + Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("rowCount").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("columnCount").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowIndex").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnIndex").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowSpan").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnSpan").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("level").ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("sections")[0].GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("isHandwritten").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("similarFontFamily").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontStyle").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontWeight").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("color").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("backgroundColor").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("languages")[0].GetProperty("locale").ToString()); + Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("languages")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("docType").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueString").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueDate").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueTime").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valuePhoneNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueInteger").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSelectionMark").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSignature").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCountryRegion").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueString").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueDate").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueTime").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valuePhoneNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueInteger").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionMark").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSignature").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCountryRegion").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("amount").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("houseNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("poBox").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("road").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("city").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("postalCode").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("countryRegion").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("streetAddress").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("suburb").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("house").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("level").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueBoolean").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueBoolean").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("confidence").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeDocument_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + + AnalyzeDocumentRequest analyzeRequest = new AnalyzeDocumentRequest + { + UrlSource = new Uri("http://localhost:3000"), + Base64Source = BinaryData.FromObjectAsJson(new object()), + }; + Operation operation = client.AnalyzeDocument(WaitUntil.Completed, "", analyzeRequest: analyzeRequest, pages: "", locale: "", stringIndexType: StringIndexType.TextElements, features: new DocumentAnalysisFeature[] { DocumentAnalysisFeature.OcrHighResolution }, queryFields: new string[] { "" }, outputContentFormat: ContentFormat.Text); + AnalyzeResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeDocument_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + + AnalyzeDocumentRequest analyzeRequest = new AnalyzeDocumentRequest + { + UrlSource = new Uri("http://localhost:3000"), + Base64Source = BinaryData.FromObjectAsJson(new object()), + }; + Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "", analyzeRequest: analyzeRequest, pages: "", locale: "", stringIndexType: StringIndexType.TextElements, features: new DocumentAnalysisFeature[] { DocumentAnalysisFeature.OcrHighResolution }, queryFields: new string[] { "" }, outputContentFormat: ContentFormat.Text); + AnalyzeResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ClassifyDocument_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new object()); + Operation operation = client.ClassifyDocument(WaitUntil.Completed, "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("stringIndexType").ToString()); + Console.WriteLine(result.GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ClassifyDocument_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new object()); + Operation operation = await client.ClassifyDocumentAsync(WaitUntil.Completed, "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("stringIndexType").ToString()); + Console.WriteLine(result.GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ClassifyDocument_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + + ClassifyDocumentRequest classifyRequest = new ClassifyDocumentRequest(); + Operation operation = client.ClassifyDocument(WaitUntil.Completed, "", classifyRequest); + AnalyzeResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ClassifyDocument_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + + ClassifyDocumentRequest classifyRequest = new ClassifyDocumentRequest(); + Operation operation = await client.ClassifyDocumentAsync(WaitUntil.Completed, "", classifyRequest); + AnalyzeResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ClassifyDocument_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + urlSource = "http://localhost:3000", + base64Source = new object(), + }); + Operation operation = client.ClassifyDocument(WaitUntil.Completed, "", content, stringIndexType: "textElements", split: "auto"); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("stringIndexType").ToString()); + Console.WriteLine(result.GetProperty("contentFormat").ToString()); + Console.WriteLine(result.GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("angle").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("width").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("height").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("role").ToString()); + Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("rowCount").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("columnCount").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowIndex").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnIndex").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowSpan").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnSpan").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("level").ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("sections")[0].GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("isHandwritten").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("similarFontFamily").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontStyle").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontWeight").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("color").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("backgroundColor").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("languages")[0].GetProperty("locale").ToString()); + Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("languages")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("docType").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueString").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueDate").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueTime").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valuePhoneNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueInteger").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSelectionMark").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSignature").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCountryRegion").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueString").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueDate").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueTime").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valuePhoneNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueInteger").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionMark").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSignature").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCountryRegion").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("amount").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("houseNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("poBox").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("road").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("city").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("postalCode").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("countryRegion").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("streetAddress").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("suburb").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("house").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("level").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueBoolean").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueBoolean").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("confidence").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ClassifyDocument_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + urlSource = "http://localhost:3000", + base64Source = new object(), + }); + Operation operation = await client.ClassifyDocumentAsync(WaitUntil.Completed, "", content, stringIndexType: "textElements", split: "auto"); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("stringIndexType").ToString()); + Console.WriteLine(result.GetProperty("contentFormat").ToString()); + Console.WriteLine(result.GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("angle").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("width").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("height").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("span").GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("words")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("span").GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("selectionMarks")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("lines")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("span").GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("barcodes")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("span").GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("pages")[0].GetProperty("formulas")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("role").ToString()); + Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("paragraphs")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("rowCount").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("columnCount").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowIndex").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnIndex").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("rowSpan").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("columnSpan").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("cells")[0].GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("tables")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("caption").GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("figures")[0].GetProperty("footnotes")[0].GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("level").ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("lists")[0].GetProperty("items")[0].GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("sections")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("sections")[0].GetProperty("elements")[0].ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("key").GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("value").GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("keyValuePairs")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("isHandwritten").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("similarFontFamily").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontStyle").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("fontWeight").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("color").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("backgroundColor").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("styles")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("languages")[0].GetProperty("locale").ToString()); + Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("languages")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("languages")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("docType").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueString").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueDate").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueTime").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valuePhoneNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueInteger").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSelectionMark").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueSignature").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCountryRegion").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueString").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueDate").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueTime").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valuePhoneNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueInteger").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSelectionMark").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueSignature").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCountryRegion").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("amount").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("houseNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("poBox").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("road").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("city").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("postalCode").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("countryRegion").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("streetAddress").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("suburb").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("house").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueAddress").GetProperty("level").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("valueBoolean").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueArray")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("amount").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencySymbol").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueCurrency").GetProperty("currencyCode").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("houseNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("poBox").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("road").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("city").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("postalCode").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("countryRegion").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("streetAddress").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("cityDistrict").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("stateDistrict").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("suburb").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("house").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueAddress").GetProperty("level").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("valueBoolean").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("content").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("pageNumber").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("boundingRegions")[0].GetProperty("polygon")[0].ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("spans")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("fields").GetProperty("").GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("documents")[0].GetProperty("confidence").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ClassifyDocument_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + + ClassifyDocumentRequest classifyRequest = new ClassifyDocumentRequest + { + UrlSource = new Uri("http://localhost:3000"), + Base64Source = BinaryData.FromObjectAsJson(new object()), + }; + Operation operation = client.ClassifyDocument(WaitUntil.Completed, "", classifyRequest, stringIndexType: StringIndexType.TextElements, split: SplitMode.Auto); + AnalyzeResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ClassifyDocument_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentAnalysisClient client = new DocumentAnalysisClient(endpoint, credential); + + ClassifyDocumentRequest classifyRequest = new ClassifyDocumentRequest + { + UrlSource = new Uri("http://localhost:3000"), + Base64Source = BinaryData.FromObjectAsJson(new object()), + }; + Operation operation = await client.ClassifyDocumentAsync(WaitUntil.Completed, "", classifyRequest, stringIndexType: StringIndexType.TextElements, split: SplitMode.Auto); + AnalyzeResult responseData = operation.Value; + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Generated/Samples/Samples_DocumentModelAdministrationClient.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Generated/Samples/Samples_DocumentModelAdministrationClient.cs new file mode 100644 index 000000000000..357c7959aa9e --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Generated/Samples/Samples_DocumentModelAdministrationClient.cs @@ -0,0 +1,2088 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Threading.Tasks; +using Azure; +using Azure.AI.DocumentIntelligence; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.AI.DocumentIntelligence.Samples +{ + public partial class Samples_DocumentModelAdministrationClient + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AuthorizeModelCopy_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + modelId = "", + }); + Response response = client.AuthorizeModelCopy(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("targetResourceId").ToString()); + Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); + Console.WriteLine(result.GetProperty("targetModelId").ToString()); + Console.WriteLine(result.GetProperty("targetModelLocation").ToString()); + Console.WriteLine(result.GetProperty("accessToken").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AuthorizeModelCopy_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + modelId = "", + }); + Response response = await client.AuthorizeModelCopyAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("targetResourceId").ToString()); + Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); + Console.WriteLine(result.GetProperty("targetModelId").ToString()); + Console.WriteLine(result.GetProperty("targetModelLocation").ToString()); + Console.WriteLine(result.GetProperty("accessToken").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AuthorizeModelCopy_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + AuthorizeCopyRequest authorizeCopyRequest = new AuthorizeCopyRequest(""); + Response response = client.AuthorizeModelCopy(authorizeCopyRequest); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AuthorizeModelCopy_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + AuthorizeCopyRequest authorizeCopyRequest = new AuthorizeCopyRequest(""); + Response response = await client.AuthorizeModelCopyAsync(authorizeCopyRequest); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AuthorizeModelCopy_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + modelId = "", + description = "", + tags = new + { + key = "", + }, + }); + Response response = client.AuthorizeModelCopy(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("targetResourceId").ToString()); + Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); + Console.WriteLine(result.GetProperty("targetModelId").ToString()); + Console.WriteLine(result.GetProperty("targetModelLocation").ToString()); + Console.WriteLine(result.GetProperty("accessToken").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AuthorizeModelCopy_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + modelId = "", + description = "", + tags = new + { + key = "", + }, + }); + Response response = await client.AuthorizeModelCopyAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("targetResourceId").ToString()); + Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); + Console.WriteLine(result.GetProperty("targetModelId").ToString()); + Console.WriteLine(result.GetProperty("targetModelLocation").ToString()); + Console.WriteLine(result.GetProperty("accessToken").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AuthorizeModelCopy_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + AuthorizeCopyRequest authorizeCopyRequest = new AuthorizeCopyRequest("") + { + Description = "", + Tags = +{ +["key"] = "" +}, + }; + Response response = client.AuthorizeModelCopy(authorizeCopyRequest); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AuthorizeModelCopy_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + AuthorizeCopyRequest authorizeCopyRequest = new AuthorizeCopyRequest("") + { + Description = "", + Tags = +{ +["key"] = "" +}, + }; + Response response = await client.AuthorizeModelCopyAsync(authorizeCopyRequest); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = client.GetModel("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = await client.GetModelAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetModel_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = client.GetModel(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetModel_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = await client.GetModelAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = client.GetModel("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); + Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = await client.GetModelAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); + Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetModel_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = client.GetModel(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetModel_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = await client.GetModelAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DeleteModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = client.DeleteModel(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DeleteModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = await client.DeleteModelAsync(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DeleteModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = client.DeleteModel(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DeleteModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = await client.DeleteModelAsync(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetResourceInfo_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = client.GetResourceInfo(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("customDocumentModels").GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("customDocumentModels").GetProperty("limit").ToString()); + Console.WriteLine(result.GetProperty("customNeuralDocumentModelBuilds").GetProperty("used").ToString()); + Console.WriteLine(result.GetProperty("customNeuralDocumentModelBuilds").GetProperty("quota").ToString()); + Console.WriteLine(result.GetProperty("customNeuralDocumentModelBuilds").GetProperty("quotaResetDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetResourceInfo_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = await client.GetResourceInfoAsync(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("customDocumentModels").GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("customDocumentModels").GetProperty("limit").ToString()); + Console.WriteLine(result.GetProperty("customNeuralDocumentModelBuilds").GetProperty("used").ToString()); + Console.WriteLine(result.GetProperty("customNeuralDocumentModelBuilds").GetProperty("quota").ToString()); + Console.WriteLine(result.GetProperty("customNeuralDocumentModelBuilds").GetProperty("quotaResetDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetResourceInfo_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = client.GetResourceInfo(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetResourceInfo_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = await client.GetResourceInfoAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetResourceInfo_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = client.GetResourceInfo(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("customDocumentModels").GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("customDocumentModels").GetProperty("limit").ToString()); + Console.WriteLine(result.GetProperty("customNeuralDocumentModelBuilds").GetProperty("used").ToString()); + Console.WriteLine(result.GetProperty("customNeuralDocumentModelBuilds").GetProperty("quota").ToString()); + Console.WriteLine(result.GetProperty("customNeuralDocumentModelBuilds").GetProperty("quotaResetDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetResourceInfo_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = await client.GetResourceInfoAsync(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("customDocumentModels").GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("customDocumentModels").GetProperty("limit").ToString()); + Console.WriteLine(result.GetProperty("customNeuralDocumentModelBuilds").GetProperty("used").ToString()); + Console.WriteLine(result.GetProperty("customNeuralDocumentModelBuilds").GetProperty("quota").ToString()); + Console.WriteLine(result.GetProperty("customNeuralDocumentModelBuilds").GetProperty("quotaResetDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetResourceInfo_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = client.GetResourceInfo(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetResourceInfo_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = await client.GetResourceInfoAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetOperation_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = client.GetOperation(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("operationId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("resourceLocation").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetOperation_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = await client.GetOperationAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("operationId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("resourceLocation").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetOperation_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = client.GetOperation(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetOperation_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = await client.GetOperationAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetOperation_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = client.GetOperation(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("operationId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("percentCompleted").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("resourceLocation").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetOperation_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = await client.GetOperationAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("operationId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("percentCompleted").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("resourceLocation").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetOperation_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = client.GetOperation(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetOperation_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = await client.GetOperationAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetClassifier_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = client.GetClassifier("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("classifierId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetClassifier_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = await client.GetClassifierAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("classifierId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetClassifier_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = client.GetClassifier(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetClassifier_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = await client.GetClassifierAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetClassifier_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = client.GetClassifier("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("classifierId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("sourceKind").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("prefix").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetClassifier_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = await client.GetClassifierAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("classifierId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("sourceKind").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("prefix").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetClassifier_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = client.GetClassifier(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetClassifier_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = await client.GetClassifierAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DeleteClassifier_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = client.DeleteClassifier(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DeleteClassifier_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = await client.DeleteClassifierAsync(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DeleteClassifier_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = client.DeleteClassifier(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DeleteClassifier_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + Response response = await client.DeleteClassifierAsync(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetModels_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + foreach (BinaryData item in client.GetModels(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetModels_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + await foreach (BinaryData item in client.GetModelsAsync(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetModels_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + foreach (DocumentModelSummary item in client.GetModels()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetModels_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + await foreach (DocumentModelSummary item in client.GetModelsAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetModels_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + foreach (BinaryData item in client.GetModels(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetModels_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + await foreach (BinaryData item in client.GetModelsAsync(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetModels_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + foreach (DocumentModelSummary item in client.GetModels()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetModels_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + await foreach (DocumentModelSummary item in client.GetModelsAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetOperations_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + foreach (BinaryData item in client.GetOperations(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("operationId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("resourceLocation").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetOperations_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + await foreach (BinaryData item in client.GetOperationsAsync(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("operationId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("resourceLocation").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetOperations_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + foreach (OperationSummary item in client.GetOperations()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetOperations_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + await foreach (OperationSummary item in client.GetOperationsAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetOperations_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + foreach (BinaryData item in client.GetOperations(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("operationId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("percentCompleted").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("resourceLocation").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetOperations_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + await foreach (BinaryData item in client.GetOperationsAsync(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("operationId").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("percentCompleted").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("resourceLocation").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetOperations_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + foreach (OperationSummary item in client.GetOperations()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetOperations_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + await foreach (OperationSummary item in client.GetOperationsAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetClassifiers_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + foreach (BinaryData item in client.GetClassifiers(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("classifierId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetClassifiers_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + await foreach (BinaryData item in client.GetClassifiersAsync(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("classifierId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetClassifiers_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + foreach (DocumentClassifierDetails item in client.GetClassifiers()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetClassifiers_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + await foreach (DocumentClassifierDetails item in client.GetClassifiersAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetClassifiers_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + foreach (BinaryData item in client.GetClassifiers(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("classifierId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("sourceKind").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("prefix").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetClassifiers_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + await foreach (BinaryData item in client.GetClassifiersAsync(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("classifierId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("sourceKind").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("prefix").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetClassifiers_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + foreach (DocumentClassifierDetails item in client.GetClassifiers()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetClassifiers_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + await foreach (DocumentClassifierDetails item in client.GetClassifiersAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_BuildDocument_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + modelId = "", + buildMode = "template", + }); + Operation operation = client.BuildDocument(WaitUntil.Completed, content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_BuildDocument_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + modelId = "", + buildMode = "template", + }); + Operation operation = await client.BuildDocumentAsync(WaitUntil.Completed, content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_BuildDocument_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + BuildDocumentModelRequest buildRequest = new BuildDocumentModelRequest("", DocumentBuildMode.Template); + Operation operation = client.BuildDocument(WaitUntil.Completed, buildRequest); + DocumentModelDetails responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_BuildDocument_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + BuildDocumentModelRequest buildRequest = new BuildDocumentModelRequest("", DocumentBuildMode.Template); + Operation operation = await client.BuildDocumentAsync(WaitUntil.Completed, buildRequest); + DocumentModelDetails responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_BuildDocument_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + modelId = "", + description = "", + buildMode = "template", + azureBlobSource = new + { + containerUrl = "http://localhost:3000", + prefix = "", + }, + azureBlobFileListSource = new + { + containerUrl = "http://localhost:3000", + fileList = "", + }, + tags = new + { + key = "", + }, + }); + Operation operation = client.BuildDocument(WaitUntil.Completed, content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); + Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_BuildDocument_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + modelId = "", + description = "", + buildMode = "template", + azureBlobSource = new + { + containerUrl = "http://localhost:3000", + prefix = "", + }, + azureBlobFileListSource = new + { + containerUrl = "http://localhost:3000", + fileList = "", + }, + tags = new + { + key = "", + }, + }); + Operation operation = await client.BuildDocumentAsync(WaitUntil.Completed, content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); + Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_BuildDocument_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + BuildDocumentModelRequest buildRequest = new BuildDocumentModelRequest("", DocumentBuildMode.Template) + { + Description = "", + AzureBlobSource = new AzureBlobContentSource(new Uri("http://localhost:3000")) + { + Prefix = "", + }, + AzureBlobFileListSource = new AzureBlobFileListContentSource(new Uri("http://localhost:3000"), ""), + Tags = +{ +["key"] = "" +}, + }; + Operation operation = client.BuildDocument(WaitUntil.Completed, buildRequest); + DocumentModelDetails responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_BuildDocument_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + BuildDocumentModelRequest buildRequest = new BuildDocumentModelRequest("", DocumentBuildMode.Template) + { + Description = "", + AzureBlobSource = new AzureBlobContentSource(new Uri("http://localhost:3000")) + { + Prefix = "", + }, + AzureBlobFileListSource = new AzureBlobFileListContentSource(new Uri("http://localhost:3000"), ""), + Tags = +{ +["key"] = "" +}, + }; + Operation operation = await client.BuildDocumentAsync(WaitUntil.Completed, buildRequest); + DocumentModelDetails responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ComposeModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + modelId = "", + componentModels = new object[] + { +new +{ +modelId = "", +} + }, + }); + Operation operation = client.ComposeModel(WaitUntil.Completed, content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ComposeModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + modelId = "", + componentModels = new object[] + { +new +{ +modelId = "", +} + }, + }); + Operation operation = await client.ComposeModelAsync(WaitUntil.Completed, content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ComposeModel_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + ComposeDocumentModelRequest composeRequest = new ComposeDocumentModelRequest("", new ComponentDocumentModelDetails[] + { +new ComponentDocumentModelDetails("") + }); + Operation operation = client.ComposeModel(WaitUntil.Completed, composeRequest); + DocumentModelDetails responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ComposeModel_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + ComposeDocumentModelRequest composeRequest = new ComposeDocumentModelRequest("", new ComponentDocumentModelDetails[] + { +new ComponentDocumentModelDetails("") + }); + Operation operation = await client.ComposeModelAsync(WaitUntil.Completed, composeRequest); + DocumentModelDetails responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ComposeModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + modelId = "", + description = "", + componentModels = new object[] + { +new +{ +modelId = "", +} + }, + tags = new + { + key = "", + }, + }); + Operation operation = client.ComposeModel(WaitUntil.Completed, content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); + Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ComposeModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + modelId = "", + description = "", + componentModels = new object[] + { +new +{ +modelId = "", +} + }, + tags = new + { + key = "", + }, + }); + Operation operation = await client.ComposeModelAsync(WaitUntil.Completed, content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); + Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ComposeModel_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + ComposeDocumentModelRequest composeRequest = new ComposeDocumentModelRequest("", new ComponentDocumentModelDetails[] + { +new ComponentDocumentModelDetails("") + }) + { + Description = "", + Tags = +{ +["key"] = "" +}, + }; + Operation operation = client.ComposeModel(WaitUntil.Completed, composeRequest); + DocumentModelDetails responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ComposeModel_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + ComposeDocumentModelRequest composeRequest = new ComposeDocumentModelRequest("", new ComponentDocumentModelDetails[] + { +new ComponentDocumentModelDetails("") + }) + { + Description = "", + Tags = +{ +["key"] = "" +}, + }; + Operation operation = await client.ComposeModelAsync(WaitUntil.Completed, composeRequest); + DocumentModelDetails responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_CopyModelTo_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + targetResourceId = "", + targetResourceRegion = "", + targetModelId = "", + targetModelLocation = "http://localhost:3000", + accessToken = "", + expirationDateTime = "2022-05-10T14:57:31.2311892-04:00", + }); + Operation operation = client.CopyModelTo(WaitUntil.Completed, "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_CopyModelTo_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + targetResourceId = "", + targetResourceRegion = "", + targetModelId = "", + targetModelLocation = "http://localhost:3000", + accessToken = "", + expirationDateTime = "2022-05-10T14:57:31.2311892-04:00", + }); + Operation operation = await client.CopyModelToAsync(WaitUntil.Completed, "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_CopyModelTo_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + CopyAuthorization copyToRequest = new CopyAuthorization("", "", "", new Uri("http://localhost:3000"), "", DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); + Operation operation = client.CopyModelTo(WaitUntil.Completed, "", copyToRequest); + DocumentModelDetails responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_CopyModelTo_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + CopyAuthorization copyToRequest = new CopyAuthorization("", "", "", new Uri("http://localhost:3000"), "", DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); + Operation operation = await client.CopyModelToAsync(WaitUntil.Completed, "", copyToRequest); + DocumentModelDetails responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_CopyModelTo_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + targetResourceId = "", + targetResourceRegion = "", + targetModelId = "", + targetModelLocation = "http://localhost:3000", + accessToken = "", + expirationDateTime = "2022-05-10T14:57:31.2311892-04:00", + }); + Operation operation = client.CopyModelTo(WaitUntil.Completed, "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); + Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_CopyModelTo_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + targetResourceId = "", + targetResourceRegion = "", + targetModelId = "", + targetModelLocation = "http://localhost:3000", + accessToken = "", + expirationDateTime = "2022-05-10T14:57:31.2311892-04:00", + }); + Operation operation = await client.CopyModelToAsync(WaitUntil.Completed, "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); + Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_CopyModelTo_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + CopyAuthorization copyToRequest = new CopyAuthorization("", "", "", new Uri("http://localhost:3000"), "", DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); + Operation operation = client.CopyModelTo(WaitUntil.Completed, "", copyToRequest); + DocumentModelDetails responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_CopyModelTo_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + CopyAuthorization copyToRequest = new CopyAuthorization("", "", "", new Uri("http://localhost:3000"), "", DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); + Operation operation = await client.CopyModelToAsync(WaitUntil.Completed, "", copyToRequest); + DocumentModelDetails responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_BuildClassifier_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + classifierId = "", + docTypes = new + { + key = new object(), + }, + }); + Operation operation = client.BuildClassifier(WaitUntil.Completed, content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("classifierId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_BuildClassifier_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + classifierId = "", + docTypes = new + { + key = new object(), + }, + }); + Operation operation = await client.BuildClassifierAsync(WaitUntil.Completed, content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("classifierId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_BuildClassifier_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + BuildDocumentClassifierRequest buildRequest = new BuildDocumentClassifierRequest("", new Dictionary + { + ["key"] = new ClassifierDocumentTypeDetails() + }); + Operation operation = client.BuildClassifier(WaitUntil.Completed, buildRequest); + DocumentClassifierDetails responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_BuildClassifier_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + BuildDocumentClassifierRequest buildRequest = new BuildDocumentClassifierRequest("", new Dictionary + { + ["key"] = new ClassifierDocumentTypeDetails() + }); + Operation operation = await client.BuildClassifierAsync(WaitUntil.Completed, buildRequest); + DocumentClassifierDetails responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_BuildClassifier_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + classifierId = "", + description = "", + docTypes = new + { + key = new + { + sourceKind = "url", + azureBlobSource = new + { + containerUrl = "http://localhost:3000", + prefix = "", + }, + azureBlobFileListSource = new + { + containerUrl = "http://localhost:3000", + fileList = "", + }, + }, + }, + }); + Operation operation = client.BuildClassifier(WaitUntil.Completed, content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("classifierId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("sourceKind").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("prefix").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_BuildClassifier_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + classifierId = "", + description = "", + docTypes = new + { + key = new + { + sourceKind = "url", + azureBlobSource = new + { + containerUrl = "http://localhost:3000", + prefix = "", + }, + azureBlobFileListSource = new + { + containerUrl = "http://localhost:3000", + fileList = "", + }, + }, + }, + }); + Operation operation = await client.BuildClassifierAsync(WaitUntil.Completed, content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("classifierId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("sourceKind").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobSource").GetProperty("prefix").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_BuildClassifier_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + BuildDocumentClassifierRequest buildRequest = new BuildDocumentClassifierRequest("", new Dictionary + { + ["key"] = new ClassifierDocumentTypeDetails + { + SourceKind = ContentSourceKind.Url, + AzureBlobSource = new AzureBlobContentSource(new Uri("http://localhost:3000")) + { + Prefix = "", + }, + AzureBlobFileListSource = new AzureBlobFileListContentSource(new Uri("http://localhost:3000"), ""), + } + }) + { + Description = "", + }; + Operation operation = client.BuildClassifier(WaitUntil.Completed, buildRequest); + DocumentClassifierDetails responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_BuildClassifier_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); + + BuildDocumentClassifierRequest buildRequest = new BuildDocumentClassifierRequest("", new Dictionary + { + ["key"] = new ClassifierDocumentTypeDetails + { + SourceKind = ContentSourceKind.Url, + AzureBlobSource = new AzureBlobContentSource(new Uri("http://localhost:3000")) + { + Prefix = "", + }, + AzureBlobFileListSource = new AzureBlobFileListContentSource(new Uri("http://localhost:3000"), ""), + } + }) + { + Description = "", + }; + Operation operation = await client.BuildClassifierAsync(WaitUntil.Completed, buildRequest); + DocumentClassifierDetails responseData = operation.Value; + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tsp-location.yaml b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tsp-location.yaml new file mode 100644 index 000000000000..0e3f526a04eb --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tsp-location.yaml @@ -0,0 +1,3 @@ +directory: specification/cognitiveservices/DocumentIntelligence +commit: 33a6bff341d8d8f842412fdec67fc67fa21113ad +repo: Azure/azure-rest-api-specs-pr diff --git a/sdk/documentintelligence/ci.yml b/sdk/documentintelligence/ci.yml new file mode 100644 index 000000000000..23612921d214 --- /dev/null +++ b/sdk/documentintelligence/ci.yml @@ -0,0 +1,35 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - hotfix/* + - release/* + paths: + include: + - sdk/newprojecttypespec + - sdk/newprojecttypespec/ci.yml + - sdk/newprojecttypespec/Azure.NewProject.TypeSpec + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/newprojecttypespec + - sdk/newprojecttypespec/ci.yml + - sdk/newprojecttypespec/Azure.NewProject.TypeSpec + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: newprojecttypespec + ArtifactName: packages + Artifacts: + - name: Azure.NewProject.TypeSpec + safeName: AzureNewProjectTypeSpec From e4277e2ccd6ece0659cdb29f894314088a7263bd Mon Sep 17 00:00:00 2001 From: Caio Saldanha Date: Tue, 7 Nov 2023 13:00:31 -0800 Subject: [PATCH 2/5] [DocumentIntelligence] Added admin live tests for classifiers (#2012) --- ....AI.DocumentIntelligence.netstandard2.0.cs | 783 ++++++++++++++++++ .../src/DeserializationHelpers.cs | 29 + ...DocumentClassifierDetails.Serialization.cs | 15 + ...DocumentClassifierDetails.Serialization.cs | 8 - .../tests/DocumentAssert.cs | 80 ++ ...cumentClassifierAdministrationLiveTests.cs | 239 ++++++ .../DocumentModelAdministrationLiveTests.cs | 34 + .../DisposableDocumentClassifier.cs | 37 + .../DocumentIntelligenceLiveTestBase.cs | 90 ++ .../DocumentIntelligenceTestEnvironment.cs | 22 + 10 files changed, 1329 insertions(+), 8 deletions(-) create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/api/Azure.AI.DocumentIntelligence.netstandard2.0.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/DeserializationHelpers.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/DocumentClassifierDetails.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentAssert.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentModelAdministrationClient/DocumentClassifierAdministrationLiveTests.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentModelAdministrationClient/DocumentModelAdministrationLiveTests.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DisposableDocumentClassifier.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceLiveTestBase.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceTestEnvironment.cs diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/api/Azure.AI.DocumentIntelligence.netstandard2.0.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/api/Azure.AI.DocumentIntelligence.netstandard2.0.cs new file mode 100644 index 000000000000..daf525b3d5dd --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/api/Azure.AI.DocumentIntelligence.netstandard2.0.cs @@ -0,0 +1,783 @@ +namespace Azure.AI.DocumentIntelligence +{ + public partial class AddressValue + { + internal AddressValue() { } + public string City { get { throw null; } } + public string CityDistrict { get { throw null; } } + public string CountryRegion { get { throw null; } } + public string House { get { throw null; } } + public string HouseNumber { get { throw null; } } + public string Level { get { throw null; } } + public string PoBox { get { throw null; } } + public string PostalCode { get { throw null; } } + public string Road { get { throw null; } } + public string State { get { throw null; } } + public string StateDistrict { get { throw null; } } + public string StreetAddress { get { throw null; } } + public string Suburb { get { throw null; } } + public string Unit { get { throw null; } } + } + public static partial class AIDocumentIntelligenceModelFactory + { + public static Azure.AI.DocumentIntelligence.ChatIndexBuildOperationDetails ChatIndexBuildOperationDetails(System.Guid operationId = default(System.Guid), Azure.AI.DocumentIntelligence.OperationStatus status = default(Azure.AI.DocumentIntelligence.OperationStatus), int? percentCompleted = default(int?), System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.Uri resourceLocation = null, string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary tags = null, Azure.AI.DocumentIntelligence.DocumentIntelligenceError error = null, Azure.AI.DocumentIntelligence.ChatIndexDetails result = null) { throw null; } + public static Azure.AI.DocumentIntelligence.ChatIndexDetails ChatIndexDetails(string chatId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset expirationDateTime = default(System.DateTimeOffset), string apiVersion = null) { throw null; } + public static Azure.AI.DocumentIntelligence.CustomDocumentModelsDetails CustomDocumentModelsDetails(int count = 0, int limit = 0) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentClassifierBuildOperationDetails DocumentClassifierBuildOperationDetails(System.Guid operationId = default(System.Guid), Azure.AI.DocumentIntelligence.OperationStatus status = default(Azure.AI.DocumentIntelligence.OperationStatus), int? percentCompleted = default(int?), System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.Uri resourceLocation = null, string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary tags = null, Azure.AI.DocumentIntelligence.DocumentIntelligenceError error = null, Azure.AI.DocumentIntelligence.DocumentClassifierDetails result = null) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentClassifierDetails DocumentClassifierDetails(string classifierId = null, string description = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary docTypes = null) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentFieldSchema DocumentFieldSchema(Azure.AI.DocumentIntelligence.DocumentFieldType type = default(Azure.AI.DocumentIntelligence.DocumentFieldType), string description = null, string example = null, Azure.AI.DocumentIntelligence.DocumentFieldSchema items = null, System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentIntelligenceError DocumentIntelligenceError(string code = null, string message = null, string target = null, System.Collections.Generic.IEnumerable details = null, Azure.AI.DocumentIntelligence.InnerError innererror = null) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentModelBuildOperationDetails DocumentModelBuildOperationDetails(System.Guid operationId = default(System.Guid), Azure.AI.DocumentIntelligence.OperationStatus status = default(Azure.AI.DocumentIntelligence.OperationStatus), int? percentCompleted = default(int?), System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.Uri resourceLocation = null, string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary tags = null, Azure.AI.DocumentIntelligence.DocumentIntelligenceError error = null, Azure.AI.DocumentIntelligence.DocumentModelDetails result = null) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentModelComposeOperationDetails DocumentModelComposeOperationDetails(System.Guid operationId = default(System.Guid), Azure.AI.DocumentIntelligence.OperationStatus status = default(Azure.AI.DocumentIntelligence.OperationStatus), int? percentCompleted = default(int?), System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.Uri resourceLocation = null, string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary tags = null, Azure.AI.DocumentIntelligence.DocumentIntelligenceError error = null, Azure.AI.DocumentIntelligence.DocumentModelDetails result = null) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentModelCopyToOperationDetails DocumentModelCopyToOperationDetails(System.Guid operationId = default(System.Guid), Azure.AI.DocumentIntelligence.OperationStatus status = default(Azure.AI.DocumentIntelligence.OperationStatus), int? percentCompleted = default(int?), System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.Uri resourceLocation = null, string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary tags = null, Azure.AI.DocumentIntelligence.DocumentIntelligenceError error = null, Azure.AI.DocumentIntelligence.DocumentModelDetails result = null) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentModelDetails DocumentModelDetails(string modelId = null, string description = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary tags = null, Azure.AI.DocumentIntelligence.DocumentBuildMode buildMode = default(Azure.AI.DocumentIntelligence.DocumentBuildMode), Azure.AI.DocumentIntelligence.AzureBlobContentSource azureBlobSource = null, Azure.AI.DocumentIntelligence.AzureBlobFileListContentSource azureBlobFileListSource = null, System.Collections.Generic.IReadOnlyDictionary docTypes = null) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentModelSummary DocumentModelSummary(string modelId = null, string description = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary tags = null) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentTypeDetails DocumentTypeDetails(string description = null, Azure.AI.DocumentIntelligence.DocumentBuildMode? buildMode = default(Azure.AI.DocumentIntelligence.DocumentBuildMode?), System.Collections.Generic.IReadOnlyDictionary fieldSchema = null, System.Collections.Generic.IReadOnlyDictionary fieldConfidence = null) { throw null; } + public static Azure.AI.DocumentIntelligence.InnerError InnerError(string code = null, string message = null, Azure.AI.DocumentIntelligence.InnerError innererror = null) { throw null; } + public static Azure.AI.DocumentIntelligence.OperationDetails OperationDetails(System.Guid operationId = default(System.Guid), Azure.AI.DocumentIntelligence.OperationStatus status = default(Azure.AI.DocumentIntelligence.OperationStatus), int? percentCompleted = default(int?), System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), string kind = "Unknown", System.Uri resourceLocation = null, string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary tags = null, Azure.AI.DocumentIntelligence.DocumentIntelligenceError error = null) { throw null; } + public static Azure.AI.DocumentIntelligence.OperationSummary OperationSummary(System.Guid operationId = default(System.Guid), Azure.AI.DocumentIntelligence.OperationStatus status = default(Azure.AI.DocumentIntelligence.OperationStatus), int? percentCompleted = default(int?), System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), Azure.AI.DocumentIntelligence.OperationKind kind = default(Azure.AI.DocumentIntelligence.OperationKind), System.Uri resourceLocation = null, string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary tags = null) { throw null; } + public static Azure.AI.DocumentIntelligence.QuotaDetails QuotaDetails(int used = 0, int quota = 0, System.DateTimeOffset quotaResetDateTime = default(System.DateTimeOffset)) { throw null; } + public static Azure.AI.DocumentIntelligence.ResourceDetails ResourceDetails(Azure.AI.DocumentIntelligence.CustomDocumentModelsDetails customDocumentModels = null, Azure.AI.DocumentIntelligence.QuotaDetails customNeuralDocumentModelBuilds = null) { throw null; } + } + public partial class AnalyzedDocument + { + internal AnalyzedDocument() { } + public System.Collections.Generic.IReadOnlyList BoundingRegions { get { throw null; } } + public float Confidence { get { throw null; } } + public string DocType { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Fields { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Spans { get { throw null; } } + } + public partial class AnalyzeDocumentRequest + { + public AnalyzeDocumentRequest() { } + public System.BinaryData Base64Source { get { throw null; } set { } } + public System.Uri UrlSource { get { throw null; } set { } } + } + public partial class AnalyzeResult + { + internal AnalyzeResult() { } + public string ApiVersion { get { throw null; } } + public string Content { get { throw null; } } + public Azure.AI.DocumentIntelligence.ContentFormat? ContentFormat { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Figures { get { throw null; } } + public System.Collections.Generic.IReadOnlyList KeyValuePairs { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Languages { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Lists { get { throw null; } } + public string ModelId { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Pages { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Paragraphs { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Sections { get { throw null; } } + public Azure.AI.DocumentIntelligence.StringIndexType StringIndexType { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Styles { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Tables { get { throw null; } } + } + public partial class AuthorizeCopyRequest + { + public AuthorizeCopyRequest(string modelId) { } + public string Description { get { throw null; } set { } } + public string ModelId { get { throw null; } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } + public partial class AzureAIDocumentIntelligenceClientOptions : Azure.Core.ClientOptions + { + public AzureAIDocumentIntelligenceClientOptions(Azure.AI.DocumentIntelligence.AzureAIDocumentIntelligenceClientOptions.ServiceVersion version = Azure.AI.DocumentIntelligence.AzureAIDocumentIntelligenceClientOptions.ServiceVersion.V2023_10_31_Preview) { } + public enum ServiceVersion + { + V2022_08_31 = 1, + V2023_07_31 = 2, + V2023_10_31_Preview = 3, + } + } + public partial class AzureBlobContentSource + { + public AzureBlobContentSource(System.Uri containerUrl) { } + public System.Uri ContainerUrl { get { throw null; } set { } } + public string Prefix { get { throw null; } set { } } + } + public partial class AzureBlobFileListContentSource + { + public AzureBlobFileListContentSource(System.Uri containerUrl, string fileList) { } + public System.Uri ContainerUrl { get { throw null; } set { } } + public string FileList { get { throw null; } set { } } + } + public partial class BoundingRegion + { + internal BoundingRegion() { } + public int PageNumber { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Polygon { get { throw null; } } + } + public partial class BuildDocumentClassifierRequest + { + public BuildDocumentClassifierRequest(string classifierId, System.Collections.Generic.IDictionary docTypes) { } + public string ClassifierId { get { throw null; } } + public string Description { get { throw null; } set { } } + public System.Collections.Generic.IDictionary DocTypes { get { throw null; } } + } + public partial class BuildDocumentModelRequest + { + public BuildDocumentModelRequest(string modelId, Azure.AI.DocumentIntelligence.DocumentBuildMode buildMode) { } + public Azure.AI.DocumentIntelligence.AzureBlobFileListContentSource AzureBlobFileListSource { get { throw null; } set { } } + public Azure.AI.DocumentIntelligence.AzureBlobContentSource AzureBlobSource { get { throw null; } set { } } + public Azure.AI.DocumentIntelligence.DocumentBuildMode BuildMode { get { throw null; } } + public string Description { get { throw null; } set { } } + public string ModelId { get { throw null; } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } + public partial class ChatIndexBuildOperationDetails : Azure.AI.DocumentIntelligence.OperationDetails + { + internal ChatIndexBuildOperationDetails() : base (default(Azure.AI.DocumentIntelligence.OperationStatus), default(System.DateTimeOffset), default(System.DateTimeOffset), default(System.Uri)) { } + public Azure.AI.DocumentIntelligence.ChatIndexDetails Result { get { throw null; } } + } + public partial class ChatIndexDetails : Azure.AI.DocumentIntelligence.ChatIndexSummary + { + internal ChatIndexDetails() { } + } + public partial class ChatIndexSummary + { + internal ChatIndexSummary() { } + public string ApiVersion { get { throw null; } } + public string ChatId { get { throw null; } } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.DateTimeOffset ExpirationDateTime { get { throw null; } } + } + public partial class ClassifierDocumentTypeDetails + { + public ClassifierDocumentTypeDetails() { } + public Azure.AI.DocumentIntelligence.AzureBlobFileListContentSource AzureBlobFileListSource { get { throw null; } set { } } + public Azure.AI.DocumentIntelligence.AzureBlobContentSource AzureBlobSource { get { throw null; } set { } } + public Azure.AI.DocumentIntelligence.ContentSourceKind? SourceKind { get { throw null; } set { } } + } + public partial class ClassifyDocumentRequest + { + public ClassifyDocumentRequest() { } + public System.BinaryData Base64Source { get { throw null; } set { } } + public System.Uri UrlSource { get { throw null; } set { } } + } + public partial class ComponentDocumentModelDetails + { + public ComponentDocumentModelDetails(string modelId) { } + public string ModelId { get { throw null; } } + } + public partial class ComposeDocumentModelRequest + { + public ComposeDocumentModelRequest(string modelId, System.Collections.Generic.IEnumerable componentModels) { } + public System.Collections.Generic.IList ComponentModels { get { throw null; } } + public string Description { get { throw null; } set { } } + public string ModelId { get { throw null; } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ContentFormat : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ContentFormat(string value) { throw null; } + public static Azure.AI.DocumentIntelligence.ContentFormat Markdown { get { throw null; } } + public static Azure.AI.DocumentIntelligence.ContentFormat Text { get { throw null; } } + public bool Equals(Azure.AI.DocumentIntelligence.ContentFormat other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.DocumentIntelligence.ContentFormat left, Azure.AI.DocumentIntelligence.ContentFormat right) { throw null; } + public static implicit operator Azure.AI.DocumentIntelligence.ContentFormat (string value) { throw null; } + public static bool operator !=(Azure.AI.DocumentIntelligence.ContentFormat left, Azure.AI.DocumentIntelligence.ContentFormat right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ContentSourceKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ContentSourceKind(string value) { throw null; } + public static Azure.AI.DocumentIntelligence.ContentSourceKind AzureBlob { get { throw null; } } + public static Azure.AI.DocumentIntelligence.ContentSourceKind AzureBlobFileList { get { throw null; } } + public static Azure.AI.DocumentIntelligence.ContentSourceKind Base64 { get { throw null; } } + public static Azure.AI.DocumentIntelligence.ContentSourceKind Url { get { throw null; } } + public bool Equals(Azure.AI.DocumentIntelligence.ContentSourceKind other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.DocumentIntelligence.ContentSourceKind left, Azure.AI.DocumentIntelligence.ContentSourceKind right) { throw null; } + public static implicit operator Azure.AI.DocumentIntelligence.ContentSourceKind (string value) { throw null; } + public static bool operator !=(Azure.AI.DocumentIntelligence.ContentSourceKind left, Azure.AI.DocumentIntelligence.ContentSourceKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CopyAuthorization + { + public CopyAuthorization(string targetResourceId, string targetResourceRegion, string targetModelId, System.Uri targetModelLocation, string accessToken, System.DateTimeOffset expirationDateTime) { } + public string AccessToken { get { throw null; } set { } } + public System.DateTimeOffset ExpirationDateTime { get { throw null; } set { } } + public string TargetModelId { get { throw null; } set { } } + public System.Uri TargetModelLocation { get { throw null; } set { } } + public string TargetResourceId { get { throw null; } set { } } + public string TargetResourceRegion { get { throw null; } set { } } + } + public partial class CurrencyValue + { + internal CurrencyValue() { } + public double Amount { get { throw null; } } + public string CurrencyCode { get { throw null; } } + public string CurrencySymbol { get { throw null; } } + } + public partial class CustomDocumentModelsDetails + { + internal CustomDocumentModelsDetails() { } + public int Count { get { throw null; } } + public int Limit { get { throw null; } } + } + public partial class DocumentAnalysisClient + { + protected DocumentAnalysisClient() { } + public DocumentAnalysisClient(System.Uri endpoint, Azure.AzureKeyCredential credential) { } + public DocumentAnalysisClient(System.Uri endpoint, Azure.AzureKeyCredential credential, Azure.AI.DocumentIntelligence.AzureAIDocumentIntelligenceClientOptions options) { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Operation AnalyzeDocument(Azure.WaitUntil waitUntil, string modelId, Azure.AI.DocumentIntelligence.AnalyzeDocumentRequest analyzeRequest = null, string pages = null, string locale = null, Azure.AI.DocumentIntelligence.StringIndexType? stringIndexType = default(Azure.AI.DocumentIntelligence.StringIndexType?), System.Collections.Generic.IEnumerable features = null, System.Collections.Generic.IEnumerable queryFields = null, Azure.AI.DocumentIntelligence.ContentFormat? outputContentFormat = default(Azure.AI.DocumentIntelligence.ContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation AnalyzeDocument(Azure.WaitUntil waitUntil, string modelId, Azure.Core.RequestContent content, string pages = null, string locale = null, string stringIndexType = null, System.Collections.Generic.IEnumerable features = null, System.Collections.Generic.IEnumerable queryFields = null, string outputContentFormat = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> AnalyzeDocumentAsync(Azure.WaitUntil waitUntil, string modelId, Azure.AI.DocumentIntelligence.AnalyzeDocumentRequest analyzeRequest = null, string pages = null, string locale = null, Azure.AI.DocumentIntelligence.StringIndexType? stringIndexType = default(Azure.AI.DocumentIntelligence.StringIndexType?), System.Collections.Generic.IEnumerable features = null, System.Collections.Generic.IEnumerable queryFields = null, Azure.AI.DocumentIntelligence.ContentFormat? outputContentFormat = default(Azure.AI.DocumentIntelligence.ContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AnalyzeDocumentAsync(Azure.WaitUntil waitUntil, string modelId, Azure.Core.RequestContent content, string pages = null, string locale = null, string stringIndexType = null, System.Collections.Generic.IEnumerable features = null, System.Collections.Generic.IEnumerable queryFields = null, string outputContentFormat = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation ClassifyDocument(Azure.WaitUntil waitUntil, string classifierId, Azure.AI.DocumentIntelligence.ClassifyDocumentRequest classifyRequest, Azure.AI.DocumentIntelligence.StringIndexType? stringIndexType = default(Azure.AI.DocumentIntelligence.StringIndexType?), Azure.AI.DocumentIntelligence.SplitMode? split = default(Azure.AI.DocumentIntelligence.SplitMode?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation ClassifyDocument(Azure.WaitUntil waitUntil, string classifierId, Azure.Core.RequestContent content, string stringIndexType = null, string split = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> ClassifyDocumentAsync(Azure.WaitUntil waitUntil, string classifierId, Azure.AI.DocumentIntelligence.ClassifyDocumentRequest classifyRequest, Azure.AI.DocumentIntelligence.StringIndexType? stringIndexType = default(Azure.AI.DocumentIntelligence.StringIndexType?), Azure.AI.DocumentIntelligence.SplitMode? split = default(Azure.AI.DocumentIntelligence.SplitMode?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ClassifyDocumentAsync(Azure.WaitUntil waitUntil, string classifierId, Azure.Core.RequestContent content, string stringIndexType = null, string split = null, Azure.RequestContext context = null) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DocumentAnalysisFeature : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DocumentAnalysisFeature(string value) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentAnalysisFeature Barcodes { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentAnalysisFeature Formulas { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentAnalysisFeature KeyValuePairs { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentAnalysisFeature Languages { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentAnalysisFeature OcrHighResolution { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentAnalysisFeature QueryFields { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentAnalysisFeature StyleFont { get { throw null; } } + public bool Equals(Azure.AI.DocumentIntelligence.DocumentAnalysisFeature other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.DocumentIntelligence.DocumentAnalysisFeature left, Azure.AI.DocumentIntelligence.DocumentAnalysisFeature right) { throw null; } + public static implicit operator Azure.AI.DocumentIntelligence.DocumentAnalysisFeature (string value) { throw null; } + public static bool operator !=(Azure.AI.DocumentIntelligence.DocumentAnalysisFeature left, Azure.AI.DocumentIntelligence.DocumentAnalysisFeature right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DocumentBarcode + { + internal DocumentBarcode() { } + public float Confidence { get { throw null; } } + public string Kind { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Polygon { get { throw null; } } + public Azure.AI.DocumentIntelligence.DocumentSpan Span { get { throw null; } } + public string Value { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DocumentBuildMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DocumentBuildMode(string value) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentBuildMode Neural { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentBuildMode Template { get { throw null; } } + public bool Equals(Azure.AI.DocumentIntelligence.DocumentBuildMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.DocumentIntelligence.DocumentBuildMode left, Azure.AI.DocumentIntelligence.DocumentBuildMode right) { throw null; } + public static implicit operator Azure.AI.DocumentIntelligence.DocumentBuildMode (string value) { throw null; } + public static bool operator !=(Azure.AI.DocumentIntelligence.DocumentBuildMode left, Azure.AI.DocumentIntelligence.DocumentBuildMode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DocumentCaption + { + internal DocumentCaption() { } + public System.Collections.Generic.IReadOnlyList BoundingRegions { get { throw null; } } + public string Content { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Elements { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Spans { get { throw null; } } + } + public partial class DocumentClassifierBuildOperationDetails : Azure.AI.DocumentIntelligence.OperationDetails + { + internal DocumentClassifierBuildOperationDetails() : base (default(Azure.AI.DocumentIntelligence.OperationStatus), default(System.DateTimeOffset), default(System.DateTimeOffset), default(System.Uri)) { } + public Azure.AI.DocumentIntelligence.DocumentClassifierDetails Result { get { throw null; } } + } + public partial class DocumentClassifierDetails + { + internal DocumentClassifierDetails() { } + public string ApiVersion { get { throw null; } } + public string ClassifierId { get { throw null; } } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public string Description { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary DocTypes { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + } + public partial class DocumentField + { + internal DocumentField() { } + public System.Collections.Generic.IReadOnlyList BoundingRegions { get { throw null; } } + public float? Confidence { get { throw null; } } + public string Content { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Spans { get { throw null; } } + public Azure.AI.DocumentIntelligence.DocumentFieldType Type { get { throw null; } } + public Azure.AI.DocumentIntelligence.AddressValue ValueAddress { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ValueArray { get { throw null; } } + public bool? ValueBoolean { get { throw null; } } + public string ValueCountryRegion { get { throw null; } } + public Azure.AI.DocumentIntelligence.CurrencyValue ValueCurrency { get { throw null; } } + public System.DateTimeOffset? ValueDate { get { throw null; } } + public long? ValueInteger { get { throw null; } } + public double? ValueNumber { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary ValueObject { get { throw null; } } + public string ValuePhoneNumber { get { throw null; } } + public string ValueSelectionMark { get { throw null; } } + public string ValueSignature { get { throw null; } } + public string ValueString { get { throw null; } } + public System.TimeSpan? ValueTime { get { throw null; } } + } + public partial class DocumentFieldSchema + { + internal DocumentFieldSchema() { } + public string Description { get { throw null; } } + public string Example { get { throw null; } } + public Azure.AI.DocumentIntelligence.DocumentFieldSchema Items { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Properties { get { throw null; } } + public Azure.AI.DocumentIntelligence.DocumentFieldType Type { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DocumentFieldType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DocumentFieldType(string value) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentFieldType Address { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentFieldType Array { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentFieldType Boolean { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentFieldType CountryRegion { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentFieldType Currency { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentFieldType Date { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentFieldType Integer { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentFieldType Number { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentFieldType Object { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentFieldType PhoneNumber { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentFieldType SelectionMark { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentFieldType Signature { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentFieldType String { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentFieldType Time { get { throw null; } } + public bool Equals(Azure.AI.DocumentIntelligence.DocumentFieldType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.DocumentIntelligence.DocumentFieldType left, Azure.AI.DocumentIntelligence.DocumentFieldType right) { throw null; } + public static implicit operator Azure.AI.DocumentIntelligence.DocumentFieldType (string value) { throw null; } + public static bool operator !=(Azure.AI.DocumentIntelligence.DocumentFieldType left, Azure.AI.DocumentIntelligence.DocumentFieldType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DocumentFigure + { + internal DocumentFigure() { } + public System.Collections.Generic.IReadOnlyList BoundingRegions { get { throw null; } } + public Azure.AI.DocumentIntelligence.DocumentCaption Caption { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Elements { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Footnotes { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Spans { get { throw null; } } + } + public partial class DocumentFootnote + { + internal DocumentFootnote() { } + public System.Collections.Generic.IReadOnlyList BoundingRegions { get { throw null; } } + public string Content { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Elements { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Spans { get { throw null; } } + } + public partial class DocumentFormula + { + internal DocumentFormula() { } + public float Confidence { get { throw null; } } + public string Kind { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Polygon { get { throw null; } } + public Azure.AI.DocumentIntelligence.DocumentSpan Span { get { throw null; } } + public string Value { get { throw null; } } + } + public partial class DocumentIntelligenceError + { + internal DocumentIntelligenceError() { } + public string Code { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } + public Azure.AI.DocumentIntelligence.InnerError Innererror { get { throw null; } } + public string Message { get { throw null; } } + public string Target { get { throw null; } } + } + public partial class DocumentKeyValueElement + { + internal DocumentKeyValueElement() { } + public System.Collections.Generic.IReadOnlyList BoundingRegions { get { throw null; } } + public string Content { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Spans { get { throw null; } } + } + public partial class DocumentKeyValuePair + { + internal DocumentKeyValuePair() { } + public float Confidence { get { throw null; } } + public Azure.AI.DocumentIntelligence.DocumentKeyValueElement Key { get { throw null; } } + public Azure.AI.DocumentIntelligence.DocumentKeyValueElement Value { get { throw null; } } + } + public partial class DocumentLanguage + { + internal DocumentLanguage() { } + public float Confidence { get { throw null; } } + public string Locale { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Spans { get { throw null; } } + } + public partial class DocumentLine + { + internal DocumentLine() { } + public string Content { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Polygon { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Spans { get { throw null; } } + } + public partial class DocumentList + { + internal DocumentList() { } + public System.Collections.Generic.IReadOnlyList Items { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Spans { get { throw null; } } + } + public partial class DocumentListItem + { + internal DocumentListItem() { } + public System.Collections.Generic.IReadOnlyList BoundingRegions { get { throw null; } } + public string Content { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Elements { get { throw null; } } + public int Level { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Spans { get { throw null; } } + } + public partial class DocumentModelAdministrationClient + { + protected DocumentModelAdministrationClient() { } + public DocumentModelAdministrationClient(System.Uri endpoint, Azure.AzureKeyCredential credential) { } + public DocumentModelAdministrationClient(System.Uri endpoint, Azure.AzureKeyCredential credential, Azure.AI.DocumentIntelligence.AzureAIDocumentIntelligenceClientOptions options) { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Response AuthorizeModelCopy(Azure.AI.DocumentIntelligence.AuthorizeCopyRequest authorizeCopyRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response AuthorizeModelCopy(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> AuthorizeModelCopyAsync(Azure.AI.DocumentIntelligence.AuthorizeCopyRequest authorizeCopyRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task AuthorizeModelCopyAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation BuildClassifier(Azure.WaitUntil waitUntil, Azure.AI.DocumentIntelligence.BuildDocumentClassifierRequest buildRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation BuildClassifier(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> BuildClassifierAsync(Azure.WaitUntil waitUntil, Azure.AI.DocumentIntelligence.BuildDocumentClassifierRequest buildRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> BuildClassifierAsync(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation BuildDocument(Azure.WaitUntil waitUntil, Azure.AI.DocumentIntelligence.BuildDocumentModelRequest buildRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation BuildDocument(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> BuildDocumentAsync(Azure.WaitUntil waitUntil, Azure.AI.DocumentIntelligence.BuildDocumentModelRequest buildRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> BuildDocumentAsync(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation ComposeModel(Azure.WaitUntil waitUntil, Azure.AI.DocumentIntelligence.ComposeDocumentModelRequest composeRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation ComposeModel(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> ComposeModelAsync(Azure.WaitUntil waitUntil, Azure.AI.DocumentIntelligence.ComposeDocumentModelRequest composeRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ComposeModelAsync(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation CopyModelTo(Azure.WaitUntil waitUntil, string modelId, Azure.AI.DocumentIntelligence.CopyAuthorization copyToRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation CopyModelTo(Azure.WaitUntil waitUntil, string modelId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> CopyModelToAsync(Azure.WaitUntil waitUntil, string modelId, Azure.AI.DocumentIntelligence.CopyAuthorization copyToRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CopyModelToAsync(Azure.WaitUntil waitUntil, string modelId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DeleteClassifier(string classifierId, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteClassifierAsync(string classifierId, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DeleteModel(string modelId, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteModelAsync(string modelId, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetClassifier(string classifierId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetClassifier(string classifierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetClassifierAsync(string classifierId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetClassifierAsync(string classifierId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetClassifiers(Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetClassifiers(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetClassifiersAsync(Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetClassifiersAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetModel(string modelId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetModel(string modelId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetModelAsync(string modelId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetModelAsync(string modelId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetModels(Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetModels(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetModelsAsync(Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetModelsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetOperation(System.Guid operationId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetOperation(System.Guid operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetOperationAsync(System.Guid operationId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetOperationAsync(System.Guid operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetOperations(Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetOperations(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetOperationsAsync(Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetOperationsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetResourceInfo(Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetResourceInfo(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetResourceInfoAsync(Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetResourceInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DocumentModelBuildOperationDetails : Azure.AI.DocumentIntelligence.OperationDetails + { + internal DocumentModelBuildOperationDetails() : base (default(Azure.AI.DocumentIntelligence.OperationStatus), default(System.DateTimeOffset), default(System.DateTimeOffset), default(System.Uri)) { } + public Azure.AI.DocumentIntelligence.DocumentModelDetails Result { get { throw null; } } + } + public partial class DocumentModelComposeOperationDetails : Azure.AI.DocumentIntelligence.OperationDetails + { + internal DocumentModelComposeOperationDetails() : base (default(Azure.AI.DocumentIntelligence.OperationStatus), default(System.DateTimeOffset), default(System.DateTimeOffset), default(System.Uri)) { } + public Azure.AI.DocumentIntelligence.DocumentModelDetails Result { get { throw null; } } + } + public partial class DocumentModelCopyToOperationDetails : Azure.AI.DocumentIntelligence.OperationDetails + { + internal DocumentModelCopyToOperationDetails() : base (default(Azure.AI.DocumentIntelligence.OperationStatus), default(System.DateTimeOffset), default(System.DateTimeOffset), default(System.Uri)) { } + public Azure.AI.DocumentIntelligence.DocumentModelDetails Result { get { throw null; } } + } + public partial class DocumentModelDetails : Azure.AI.DocumentIntelligence.DocumentModelSummary + { + internal DocumentModelDetails() { } + public Azure.AI.DocumentIntelligence.AzureBlobFileListContentSource AzureBlobFileListSource { get { throw null; } } + public Azure.AI.DocumentIntelligence.AzureBlobContentSource AzureBlobSource { get { throw null; } } + public Azure.AI.DocumentIntelligence.DocumentBuildMode BuildMode { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary DocTypes { get { throw null; } } + } + public partial class DocumentModelSummary + { + internal DocumentModelSummary() { } + public string ApiVersion { get { throw null; } } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public string Description { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string ModelId { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } } + } + public partial class DocumentPage + { + internal DocumentPage() { } + public float? Angle { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Barcodes { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Formulas { get { throw null; } } + public float? Height { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Lines { get { throw null; } } + public int PageNumber { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SelectionMarks { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Spans { get { throw null; } } + public string Unit { get { throw null; } } + public float? Width { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Words { get { throw null; } } + } + public partial class DocumentParagraph + { + internal DocumentParagraph() { } + public System.Collections.Generic.IReadOnlyList BoundingRegions { get { throw null; } } + public string Content { get { throw null; } } + public string Role { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Spans { get { throw null; } } + } + public partial class DocumentSection + { + internal DocumentSection() { } + public System.Collections.Generic.IReadOnlyList Elements { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Spans { get { throw null; } } + } + public partial class DocumentSelectionMark + { + internal DocumentSelectionMark() { } + public float Confidence { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Polygon { get { throw null; } } + public Azure.AI.DocumentIntelligence.DocumentSpan Span { get { throw null; } } + public string State { get { throw null; } } + } + public partial class DocumentSpan + { + internal DocumentSpan() { } + public int Length { get { throw null; } } + public int Offset { get { throw null; } } + } + public partial class DocumentStyle + { + internal DocumentStyle() { } + public string BackgroundColor { get { throw null; } } + public string Color { get { throw null; } } + public float Confidence { get { throw null; } } + public string FontStyle { get { throw null; } } + public string FontWeight { get { throw null; } } + public bool? IsHandwritten { get { throw null; } } + public string SimilarFontFamily { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Spans { get { throw null; } } + } + public partial class DocumentTable + { + internal DocumentTable() { } + public System.Collections.Generic.IReadOnlyList BoundingRegions { get { throw null; } } + public Azure.AI.DocumentIntelligence.DocumentCaption Caption { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Cells { get { throw null; } } + public int ColumnCount { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Footnotes { get { throw null; } } + public int RowCount { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Spans { get { throw null; } } + } + public partial class DocumentTableCell + { + internal DocumentTableCell() { } + public System.Collections.Generic.IReadOnlyList BoundingRegions { get { throw null; } } + public int ColumnIndex { get { throw null; } } + public int? ColumnSpan { get { throw null; } } + public string Content { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Elements { get { throw null; } } + public string Kind { get { throw null; } } + public int RowIndex { get { throw null; } } + public int? RowSpan { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Spans { get { throw null; } } + } + public partial class DocumentTypeDetails + { + internal DocumentTypeDetails() { } + public Azure.AI.DocumentIntelligence.DocumentBuildMode? BuildMode { get { throw null; } } + public string Description { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary FieldConfidence { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary FieldSchema { get { throw null; } } + } + public partial class DocumentWord + { + internal DocumentWord() { } + public float Confidence { get { throw null; } } + public string Content { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Polygon { get { throw null; } } + public Azure.AI.DocumentIntelligence.DocumentSpan Span { get { throw null; } } + } + public partial class InnerError + { + internal InnerError() { } + public string Code { get { throw null; } } + public Azure.AI.DocumentIntelligence.InnerError Innererror { get { throw null; } } + public string Message { get { throw null; } } + } + public abstract partial class OperationDetails + { + protected OperationDetails(Azure.AI.DocumentIntelligence.OperationStatus status, System.DateTimeOffset createdDateTime, System.DateTimeOffset lastUpdatedDateTime, System.Uri resourceLocation) { } + public string ApiVersion { get { throw null; } } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public Azure.AI.DocumentIntelligence.DocumentIntelligenceError Error { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public System.Guid OperationId { get { throw null; } } + public int? PercentCompleted { get { throw null; } } + public System.Uri ResourceLocation { get { throw null; } } + public Azure.AI.DocumentIntelligence.OperationStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct OperationKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public OperationKind(string value) { throw null; } + public static Azure.AI.DocumentIntelligence.OperationKind ChatBuild { get { throw null; } } + public static Azure.AI.DocumentIntelligence.OperationKind DocumentClassifierBuild { get { throw null; } } + public static Azure.AI.DocumentIntelligence.OperationKind DocumentModelBuild { get { throw null; } } + public static Azure.AI.DocumentIntelligence.OperationKind DocumentModelCompose { get { throw null; } } + public static Azure.AI.DocumentIntelligence.OperationKind DocumentModelCopyTo { get { throw null; } } + public bool Equals(Azure.AI.DocumentIntelligence.OperationKind other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.DocumentIntelligence.OperationKind left, Azure.AI.DocumentIntelligence.OperationKind right) { throw null; } + public static implicit operator Azure.AI.DocumentIntelligence.OperationKind (string value) { throw null; } + public static bool operator !=(Azure.AI.DocumentIntelligence.OperationKind left, Azure.AI.DocumentIntelligence.OperationKind right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct OperationStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public OperationStatus(string value) { throw null; } + public static Azure.AI.DocumentIntelligence.OperationStatus Canceled { get { throw null; } } + public static Azure.AI.DocumentIntelligence.OperationStatus Failed { get { throw null; } } + public static Azure.AI.DocumentIntelligence.OperationStatus NotStarted { get { throw null; } } + public static Azure.AI.DocumentIntelligence.OperationStatus Running { get { throw null; } } + public static Azure.AI.DocumentIntelligence.OperationStatus Succeeded { get { throw null; } } + public bool Equals(Azure.AI.DocumentIntelligence.OperationStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.DocumentIntelligence.OperationStatus left, Azure.AI.DocumentIntelligence.OperationStatus right) { throw null; } + public static implicit operator Azure.AI.DocumentIntelligence.OperationStatus (string value) { throw null; } + public static bool operator !=(Azure.AI.DocumentIntelligence.OperationStatus left, Azure.AI.DocumentIntelligence.OperationStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class OperationSummary + { + internal OperationSummary() { } + public string ApiVersion { get { throw null; } } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public Azure.AI.DocumentIntelligence.OperationKind Kind { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public System.Guid OperationId { get { throw null; } } + public int? PercentCompleted { get { throw null; } } + public System.Uri ResourceLocation { get { throw null; } } + public Azure.AI.DocumentIntelligence.OperationStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } } + } + public partial class QuotaDetails + { + internal QuotaDetails() { } + public int Quota { get { throw null; } } + public System.DateTimeOffset QuotaResetDateTime { get { throw null; } } + public int Used { get { throw null; } } + } + public partial class ResourceDetails + { + internal ResourceDetails() { } + public Azure.AI.DocumentIntelligence.CustomDocumentModelsDetails CustomDocumentModels { get { throw null; } } + public Azure.AI.DocumentIntelligence.QuotaDetails CustomNeuralDocumentModelBuilds { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SplitMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SplitMode(string value) { throw null; } + public static Azure.AI.DocumentIntelligence.SplitMode Auto { get { throw null; } } + public static Azure.AI.DocumentIntelligence.SplitMode None { get { throw null; } } + public static Azure.AI.DocumentIntelligence.SplitMode PerPage { get { throw null; } } + public bool Equals(Azure.AI.DocumentIntelligence.SplitMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.DocumentIntelligence.SplitMode left, Azure.AI.DocumentIntelligence.SplitMode right) { throw null; } + public static implicit operator Azure.AI.DocumentIntelligence.SplitMode (string value) { throw null; } + public static bool operator !=(Azure.AI.DocumentIntelligence.SplitMode left, Azure.AI.DocumentIntelligence.SplitMode right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct StringIndexType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public StringIndexType(string value) { throw null; } + public static Azure.AI.DocumentIntelligence.StringIndexType TextElements { get { throw null; } } + public static Azure.AI.DocumentIntelligence.StringIndexType UnicodeCodePoint { get { throw null; } } + public static Azure.AI.DocumentIntelligence.StringIndexType Utf16CodeUnit { get { throw null; } } + public bool Equals(Azure.AI.DocumentIntelligence.StringIndexType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.DocumentIntelligence.StringIndexType left, Azure.AI.DocumentIntelligence.StringIndexType right) { throw null; } + public static implicit operator Azure.AI.DocumentIntelligence.StringIndexType (string value) { throw null; } + public static bool operator !=(Azure.AI.DocumentIntelligence.StringIndexType left, Azure.AI.DocumentIntelligence.StringIndexType right) { throw null; } + public override string ToString() { throw null; } + } +} +namespace Microsoft.Extensions.Azure +{ + public static partial class AIDocumentIntelligenceClientBuilderExtensions + { + public static Azure.Core.Extensions.IAzureClientBuilder AddDocumentAnalysisClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddDocumentAnalysisClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddDocumentModelAdministrationClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddDocumentModelAdministrationClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/DeserializationHelpers.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/DeserializationHelpers.cs new file mode 100644 index 000000000000..571fa6195472 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/DeserializationHelpers.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Text.Json; + +namespace Azure.AI.DocumentIntelligence +{ + internal static class DeserializationHelpers + { + internal static T FromOperationResponse(Response response, Func deserializationFunc) + { + using var document = JsonDocument.Parse(response.Content); + + // If this response is the outcome of a long-running operation, the result of the operation + // needs to be deserialized from the "result" property instead of the root element. Without + // this workaround, the generated code fails for long-running operations. + + if (document.RootElement.TryGetProperty("result", out var result)) + { + return deserializationFunc(result); + } + else + { + return deserializationFunc(document.RootElement); + } + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/DocumentClassifierDetails.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/DocumentClassifierDetails.Serialization.cs new file mode 100644 index 000000000000..9c35d6322648 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/DocumentClassifierDetails.Serialization.cs @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentClassifierDetails + { + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentClassifierDetails FromResponse(Response response) + { + return DeserializationHelpers.FromOperationResponse(response, DeserializeDocumentClassifierDetails); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentClassifierDetails.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentClassifierDetails.Serialization.cs index dd20d6a06c4e..f54177b4d68b 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentClassifierDetails.Serialization.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentClassifierDetails.Serialization.cs @@ -71,13 +71,5 @@ internal static DocumentClassifierDetails DeserializeDocumentClassifierDetails(J } return new DocumentClassifierDetails(classifierId, description.Value, createdDateTime, Optional.ToNullable(expirationDateTime), apiVersion, docTypes); } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static DocumentClassifierDetails FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeDocumentClassifierDetails(document.RootElement); - } } } diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentAssert.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentAssert.cs new file mode 100644 index 000000000000..de6bc5d0e89f --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentAssert.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using NUnit.Framework; + +namespace Azure.AI.DocumentIntelligence.Tests +{ + internal static class DocumentAssert + { + public static void AreEqual(AzureBlobContentSource expected, AzureBlobContentSource actual) + { + if (expected == null) + { + Assert.That(actual, Is.Null); + return; + } + + Assert.That(actual, Is.Not.Null); + + // The URI returned by the service does not include query parameters, so we're + // making sure they're not included in our comparison. + string expectedContainerUrl = expected.ContainerUrl.GetLeftPart(UriPartial.Path); + string containerUrl = actual.ContainerUrl.GetLeftPart(UriPartial.Path); + + Assert.That(containerUrl, Is.EqualTo(expectedContainerUrl)); + Assert.That(actual.Prefix, Is.EqualTo(expected.Prefix)); + } + + public static void AreEqual(AzureBlobFileListContentSource expected, AzureBlobFileListContentSource actual) + { + if (expected == null) + { + Assert.That(actual, Is.Null); + return; + } + + Assert.That(actual, Is.Not.Null); + + // The URI returned by the service does not include query parameters, so we're + // making sure they're not included in our comparison. + string expectedContainerUrl = expected.ContainerUrl.GetLeftPart(UriPartial.Path); + string containerUrl = actual.ContainerUrl.GetLeftPart(UriPartial.Path); + + Assert.That(containerUrl, Is.EqualTo(expectedContainerUrl)); + Assert.That(actual.FileList, Is.EqualTo(expected.FileList)); + } + + public static void AreEqual(DocumentClassifierDetails expected, DocumentClassifierDetails actual) + { + Assert.AreEqual(expected.ClassifierId, actual.ClassifierId); + Assert.AreEqual(expected.Description, actual.Description); + Assert.AreEqual(expected.ApiVersion, actual.ApiVersion); + Assert.AreEqual(expected.CreatedDateTime, actual.CreatedDateTime); + Assert.AreEqual(expected.ExpirationDateTime, actual.ExpirationDateTime); + + AreEquivalent(expected.DocTypes, actual.DocTypes); + } + + public static void AreEquivalent(IReadOnlyDictionary expected, IReadOnlyDictionary actual) + { + Assert.That(actual.Count, Is.EqualTo(expected.Count)); + + foreach (string key in expected.Keys) + { + ClassifierDocumentTypeDetails expectedDocType = expected[key]; + ClassifierDocumentTypeDetails docType = actual[key]; + + if (docType.SourceKind != null && expectedDocType.SourceKind != null) + { + Assert.That(docType.SourceKind, Is.EqualTo(expectedDocType.SourceKind)); + } + + AreEqual(docType.AzureBlobSource, expectedDocType.AzureBlobSource); + AreEqual(docType.AzureBlobFileListSource, expectedDocType.AzureBlobFileListSource); + } + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentModelAdministrationClient/DocumentClassifierAdministrationLiveTests.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentModelAdministrationClient/DocumentClassifierAdministrationLiveTests.cs new file mode 100644 index 000000000000..10b3ca680e19 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentModelAdministrationClient/DocumentClassifierAdministrationLiveTests.cs @@ -0,0 +1,239 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Net; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.AI.DocumentIntelligence.Tests +{ + public class DocumentClassifierAdministrationLiveTests : DocumentIntelligenceLiveTestBase + { + public DocumentClassifierAdministrationLiveTests(bool isAsync) + : base(isAsync) + { + } + + #region Build + + [RecordedTest] + public async Task BuildClassifierWithAzureBlobContentSource() + { + var client = CreateDocumentModelAdministrationClient(); + var classifierId = Recording.GenerateId(); + var description = "This classifier was generated by a .NET test."; + var startTime = Recording.UtcNow; + + var containerUrl = new Uri(TestEnvironment.ClassifierTrainingSasUrl); + var sourceA = new AzureBlobContentSource(containerUrl) { Prefix = "IRS-1040-A/train" }; + var sourceB = new AzureBlobContentSource(containerUrl) { Prefix = "IRS-1040-B/train" }; + var docTypeA = new ClassifierDocumentTypeDetails() { AzureBlobSource = sourceA }; + var docTypeB = new ClassifierDocumentTypeDetails() { AzureBlobSource = sourceB }; + var docTypes = new Dictionary() + { + { "IRS-1040-A", docTypeA }, + { "IRS-1040-B", docTypeB } + }; + + var request = new BuildDocumentClassifierRequest(classifierId, docTypes) + { + Description = description + }; + + Operation operation = null; + + try + { + operation = await client.BuildClassifierAsync(WaitUntil.Completed, request); + } + finally + { + if (operation != null && operation.HasCompleted) + { + await client.DeleteClassifierAsync(classifierId); + } + } + + Assert.That(operation.HasCompleted); + Assert.That(operation.HasValue); + + DocumentClassifierDetails classifier = operation.Value; + + Assert.That(classifier.ClassifierId, Is.EqualTo(classifierId)); + Assert.That(classifier.Description, Is.EqualTo(description)); + Assert.That(classifier.ApiVersion, Is.EqualTo(ServiceVersionString)); + Assert.That(classifier.CreatedDateTime, Is.GreaterThan(startTime)); + Assert.That(classifier.ExpirationDateTime, Is.GreaterThan(classifier.CreatedDateTime)); + + DocumentAssert.AreEquivalent(docTypes, classifier.DocTypes); + + foreach (var docType in classifier.DocTypes.Values) + { + Assert.That(docType.SourceKind, Is.Null); + } + } + + [RecordedTest] + public async Task BuildClassifierWithAzureBlobFileListContentSource() + { + var client = CreateDocumentModelAdministrationClient(); + var classifierId = Recording.GenerateId(); + var description = "This classifier was generated by a .NET test."; + var startTime = Recording.UtcNow; + + var containerUrl = new Uri(TestEnvironment.ClassifierTrainingSasUrl); + var sourceA = new AzureBlobFileListContentSource(containerUrl, "IRS-1040-A.jsonl"); + var sourceB = new AzureBlobFileListContentSource(containerUrl, "IRS-1040-B.jsonl"); + var docTypeA = new ClassifierDocumentTypeDetails() { AzureBlobFileListSource = sourceA }; + var docTypeB = new ClassifierDocumentTypeDetails() { AzureBlobFileListSource = sourceB }; + var docTypes = new Dictionary() + { + { "IRS-1040-A", docTypeA }, + { "IRS-1040-B", docTypeB } + }; + + var request = new BuildDocumentClassifierRequest(classifierId, docTypes) + { + Description = description + }; + + Operation operation = null; + + try + { + operation = await client.BuildClassifierAsync(WaitUntil.Completed, request); + } + finally + { + if (operation != null && operation.HasCompleted) + { + await client.DeleteClassifierAsync(classifierId); + } + } + + Assert.That(operation.HasCompleted); + Assert.That(operation.HasValue); + + DocumentClassifierDetails classifier = operation.Value; + + Assert.That(classifier.ClassifierId, Is.EqualTo(classifierId)); + Assert.That(classifier.Description, Is.EqualTo(description)); + Assert.That(classifier.ApiVersion, Is.EqualTo(ServiceVersionString)); + Assert.That(classifier.CreatedDateTime, Is.GreaterThan(startTime)); + Assert.That(classifier.ExpirationDateTime, Is.GreaterThan(classifier.CreatedDateTime)); + + DocumentAssert.AreEquivalent(docTypes, classifier.DocTypes); + + foreach (var docType in classifier.DocTypes.Values) + { + Assert.That(docType.SourceKind, Is.Null); + } + } + + #endregion Build + + #region Get + + [RecordedTest] + public async Task GetClassifier() + { + var client = CreateDocumentModelAdministrationClient(); + var description = "This classifier was generated by a .NET test."; + + await using var disposableClassifier = await BuildDisposableDocumentClassifierAsync(description); + + DocumentClassifierDetails expected = disposableClassifier.Value; + DocumentClassifierDetails classifier = await client.GetClassifierAsync(disposableClassifier.ClassifierId); + + DocumentAssert.AreEqual(expected, classifier); + } + + [RecordedTest] + public void GetClassifierCanParseError() + { + var client = CreateDocumentModelAdministrationClient(); + var classifierId = "00000000-0000-0000-0000-000000000000"; + + RequestFailedException ex = Assert.ThrowsAsync(async () => await client.GetClassifierAsync(classifierId)); + + Assert.That(ex.ErrorCode, Is.EqualTo("NotFound")); + } + + #endregion + + #region List + + [RecordedTest] + public async Task GetClassifiers() + { + var client = CreateDocumentModelAdministrationClient(); + var description = "This classifier was generated by a .NET test."; + + await using var disposableClassifier0 = await BuildDisposableDocumentClassifierAsync(description); + await using var disposableClassifier1 = await BuildDisposableDocumentClassifierAsync(description); + + var expectedIdMapping = new Dictionary() + { + { disposableClassifier0.ClassifierId, disposableClassifier0.Value }, + { disposableClassifier1.ClassifierId, disposableClassifier1.Value } + }; + var idMapping = new Dictionary(); + + await foreach (DocumentClassifierDetails classifier in client.GetClassifiersAsync()) + { + if (expectedIdMapping.ContainsKey(classifier.ClassifierId)) + { + idMapping.Add(classifier.ClassifierId, classifier); + } + + if (idMapping.Count == expectedIdMapping.Count) + { + break; + } + } + + Assert.That(idMapping.Count, Is.EqualTo(expectedIdMapping.Count)); + + foreach (string id in expectedIdMapping.Keys) + { + Assert.That(idMapping, Contains.Key(id)); + + DocumentClassifierDetails expected = expectedIdMapping[id]; + DocumentClassifierDetails classifier = idMapping[id]; + + DocumentAssert.AreEqual(expected, classifier); + } + } + + #endregion List + + #region Delete + + [RecordedTest] + public async Task DeleteClassifier() + { + var client = CreateDocumentModelAdministrationClient(); + + var disposableClassifier = await BuildDisposableDocumentClassifierAsync(); + var response = await client.DeleteClassifierAsync(disposableClassifier.ClassifierId); + + Assert.That(response.Status, Is.EqualTo((int)HttpStatusCode.NoContent)); + } + + [RecordedTest] + public void DeleteClassifierCanParseError() + { + var client = CreateDocumentModelAdministrationClient(); + var classifierId = "00000000-0000-0000-0000-000000000000"; + + RequestFailedException ex = Assert.ThrowsAsync(async () => await client.DeleteClassifierAsync(classifierId)); + + Assert.That(ex.ErrorCode, Is.EqualTo("NotFound")); + } + + #endregion Delete + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentModelAdministrationClient/DocumentModelAdministrationLiveTests.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentModelAdministrationClient/DocumentModelAdministrationLiveTests.cs new file mode 100644 index 000000000000..4a156164e82a --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentModelAdministrationClient/DocumentModelAdministrationLiveTests.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.AI.DocumentIntelligence.Tests +{ + public class DocumentModelAdministrationLiveTests : DocumentIntelligenceLiveTestBase + { + public DocumentModelAdministrationLiveTests(bool isAsync) + : base(isAsync) + { + } + + [RecordedTest] + public async Task AuthorizeModelCopy() + { + var client = CreateDocumentModelAdministrationClient(); + var modelId = Recording.GenerateId(); + var request = new AuthorizeCopyRequest(modelId); + + CopyAuthorization copyAuthorization = await client.AuthorizeModelCopyAsync(request); + + Assert.That(copyAuthorization.TargetModelId, Is.EqualTo(modelId)); + Assert.That(copyAuthorization.TargetResourceId, Is.EqualTo(TestEnvironment.ResourceId)); + Assert.That(copyAuthorization.TargetResourceRegion, Is.EqualTo(TestEnvironment.ResourceRegion)); + Assert.That(copyAuthorization.AccessToken, Is.Not.Null); + Assert.That(copyAuthorization.AccessToken, Is.Not.Empty); + Assert.That(copyAuthorization.ExpirationDateTime, Is.GreaterThan(Recording.UtcNow)); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DisposableDocumentClassifier.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DisposableDocumentClassifier.cs new file mode 100644 index 000000000000..f1d4880db59f --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DisposableDocumentClassifier.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Threading.Tasks; + +namespace Azure.AI.DocumentIntelligence.Tests +{ + public class DisposableDocumentClassifier : IAsyncDisposable + { + private readonly DocumentModelAdministrationClient _client; + + private DisposableDocumentClassifier(DocumentModelAdministrationClient client, Operation operation) + { + _client = client; + Operation = operation; + } + + public Operation Operation { get; } + + public DocumentClassifierDetails Value => Operation.Value; + + public string ClassifierId => Value.ClassifierId; + + public static async Task BuildAsync(DocumentModelAdministrationClient client, BuildDocumentClassifierRequest buildRequest) + { + Operation operation = await client.BuildClassifierAsync(WaitUntil.Completed, buildRequest); + + return new DisposableDocumentClassifier(client, operation); + } + + public async ValueTask DisposeAsync() + { + await _client.DeleteClassifierAsync(Value.ClassifierId); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceLiveTestBase.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceLiveTestBase.cs new file mode 100644 index 000000000000..101ddec9ceed --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceLiveTestBase.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.Core.TestFramework; +using Azure.Core.TestFramework.Models; + +namespace Azure.AI.DocumentIntelligence.Tests +{ + public class DocumentIntelligenceLiveTestBase : RecordedTestBase + { + private readonly AzureAIDocumentIntelligenceClientOptions _clientOptions; + + public DocumentIntelligenceLiveTestBase(bool isAsync, RecordedTestMode? mode = null) + : base(isAsync, mode) + { + // After rebranding to Document Intelligence, the paths in service endpoints have been renamed as well. For example: + // Until 2023-07-31: /formrecognizer/documentModels:build + // After 2023-07-31: /documentintelligence/documentModels:build + // This library has been generated from a typespec file targeting 2023-10-31-preview, so the generated code builds + // endpoints with the 'documentintelligence' path. We're still using 2023-07-31 for testing, so we need to replace + // it with 'formrecognizer'. We are using a ReplaceDocumentIntelligencePolicy to this end as a temporary workaround. + + _clientOptions = new AzureAIDocumentIntelligenceClientOptions(AzureAIDocumentIntelligenceClientOptions.ServiceVersion.V2023_07_31); + _clientOptions.AddPolicy(new ReplaceDocumentIntelligencePolicy(), HttpPipelinePosition.PerCall); + + JsonPathSanitizers.Add("$..accessToken"); + BodyKeySanitizers.Add(new BodyKeySanitizer("https://sanitized.blob.core.windows.net") { JsonPath = "$..containerUrl" }); + SanitizedHeaders.Add("Ocp-Apim-Subscription-Key"); + } + + protected string ServiceVersionString { get; } = "2023-07-31"; + + protected DocumentModelAdministrationClient CreateDocumentModelAdministrationClient() + { + var endpoint = new Uri(TestEnvironment.Endpoint); + var credential = new AzureKeyCredential(TestEnvironment.ApiKey); + + var nonInstrumentedClient = new DocumentModelAdministrationClient(endpoint, credential, _clientOptions); + + return InstrumentClient(nonInstrumentedClient); + } + + protected async Task BuildDisposableDocumentClassifierAsync(string description = null) + { + var client = CreateDocumentModelAdministrationClient(); + var classifierId = Recording.GenerateId(); + var containerUrl = new Uri(TestEnvironment.ClassifierTrainingSasUrl); + var sourceA = new AzureBlobContentSource(containerUrl) { Prefix = "IRS-1040-A/train" }; + var sourceB = new AzureBlobContentSource(containerUrl) { Prefix = "IRS-1040-B/train" }; + var sourceC = new AzureBlobContentSource(containerUrl) { Prefix = "IRS-1040-C/train" }; + var sourceD = new AzureBlobContentSource(containerUrl) { Prefix = "IRS-1040-D/train" }; + var sourceE = new AzureBlobContentSource(containerUrl) { Prefix = "IRS-1040-E/train" }; + var docTypeA = new ClassifierDocumentTypeDetails() { AzureBlobSource = sourceA }; + var docTypeB = new ClassifierDocumentTypeDetails() { AzureBlobSource = sourceB }; + var docTypeC = new ClassifierDocumentTypeDetails() { AzureBlobSource = sourceC }; + var docTypeD = new ClassifierDocumentTypeDetails() { AzureBlobSource = sourceD }; + var docTypeE = new ClassifierDocumentTypeDetails() { AzureBlobSource = sourceE }; + var docTypes = new Dictionary() + { + { "IRS-1040-A", docTypeA }, + { "IRS-1040-B", docTypeB }, + { "IRS-1040-C", docTypeC }, + { "IRS-1040-D", docTypeD }, + { "IRS-1040-E", docTypeE } + }; + + var request = new BuildDocumentClassifierRequest(classifierId, docTypes) + { + Description = description + }; + + return await DisposableDocumentClassifier.BuildAsync(client, request); + } + + private class ReplaceDocumentIntelligencePolicy : HttpPipelineSynchronousPolicy + { + public override void OnSendingRequest(HttpMessage message) + { + RequestUriBuilder uriBuilder = message.Request.Uri; + + uriBuilder.Path = uriBuilder.Path.Replace("documentintelligence", "formrecognizer"); + } + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceTestEnvironment.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceTestEnvironment.cs new file mode 100644 index 000000000000..0c619064c278 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceTestEnvironment.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.AI.DocumentIntelligence.Tests +{ + public class DocumentIntelligenceTestEnvironment : TestEnvironment + { + private const string SanitizedSasUrl = "https://sanitized.blob.core.windows.net"; + + public string Endpoint => GetRecordedVariable("ENDPOINT"); + + public string ApiKey => GetRecordedVariable("API_KEY", options => options.IsSecret()); + + public string ResourceId => GetRecordedVariable("RESOURCE_ID"); + + public string ResourceRegion => GetRecordedVariable("RESOURCE_REGION"); + + public string ClassifierTrainingSasUrl => GetRecordedVariable("CLASSIFIER_BLOB_CONTAINER_SAS_URL", options => options.IsSecret(SanitizedSasUrl)); + } +} From e82d6c46cca2195ab2cdde9d8f171e286ca2941c Mon Sep 17 00:00:00 2001 From: Caio Saldanha Date: Tue, 7 Nov 2023 16:55:04 -0800 Subject: [PATCH 3/5] [DocumentIntelligence] Added admin live tests for models (#2015) --- .../src/DocumentModelDetails.Serialization.cs | 15 + .../DocumentModelDetails.Serialization.cs | 8 - .../tests/DocumentAssert.cs | 68 +++ .../DocumentModelAdministrationLiveTests.cs | 390 ++++++++++++++++++ .../Infrastructure/DisposableDocumentModel.cs | 37 ++ .../DocumentIntelligenceLiveTestBase.cs | 24 ++ .../DocumentIntelligenceTestEnvironment.cs | 2 + 7 files changed, 536 insertions(+), 8 deletions(-) create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/DocumentModelDetails.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DisposableDocumentModel.cs diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/DocumentModelDetails.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/DocumentModelDetails.Serialization.cs new file mode 100644 index 000000000000..45b670a43800 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/DocumentModelDetails.Serialization.cs @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentModelDetails + { + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new DocumentModelDetails FromResponse(Response response) + { + return DeserializationHelpers.FromOperationResponse(response, DeserializeDocumentModelDetails); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelDetails.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelDetails.Serialization.cs index 8fc9051718c5..d327c8371ee9 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelDetails.Serialization.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelDetails.Serialization.cs @@ -116,13 +116,5 @@ internal static DocumentModelDetails DeserializeDocumentModelDetails(JsonElement } return new DocumentModelDetails(modelId, description.Value, createdDateTime, Optional.ToNullable(expirationDateTime), apiVersion.Value, Optional.ToDictionary(tags), buildMode, azureBlobSource.Value, azureBlobFileListSource.Value, Optional.ToDictionary(docTypes)); } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new DocumentModelDetails FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeDocumentModelDetails(document.RootElement); - } } } diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentAssert.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentAssert.cs index de6bc5d0e89f..8050eaa7d7ee 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentAssert.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentAssert.cs @@ -58,6 +58,48 @@ public static void AreEqual(DocumentClassifierDetails expected, DocumentClassifi AreEquivalent(expected.DocTypes, actual.DocTypes); } + public static void AreEqual(DocumentFieldSchema expected, DocumentFieldSchema actual) + { + if (expected == null) + { + Assert.That(actual, Is.Null); + return; + } + + Assert.That(actual, Is.Not.Null); + + Assert.That(actual.Type, Is.EqualTo(expected.Type)); + Assert.That(actual.Description, Is.EqualTo(expected.Description)); + Assert.That(actual.Example, Is.EqualTo(expected.Example)); + + AreEqual(expected.Items, actual.Items); + AreEquivalent(expected.Properties, actual.Properties); + } + + public static void AreEqual(DocumentModelDetails expected, DocumentModelDetails actual) + { + Assert.That(actual.ModelId, Is.EqualTo(expected.ModelId)); + Assert.That(actual.Description, Is.EqualTo(expected.Description)); + Assert.That(actual.ApiVersion, Is.EqualTo(expected.ApiVersion)); + Assert.That(actual.CreatedDateTime, Is.EqualTo(expected.CreatedDateTime)); + Assert.That(actual.ExpirationDateTime, Is.EqualTo(expected.ExpirationDateTime)); + Assert.That(actual.Tags, Is.EquivalentTo(expected.Tags)); + + AreEqual(expected.AzureBlobSource, actual.AzureBlobSource); + AreEqual(expected.AzureBlobFileListSource, actual.AzureBlobFileListSource); + + AreEquivalent(expected.DocTypes, actual.DocTypes); + } + + public static void AreEqual(DocumentTypeDetails expected, DocumentTypeDetails actual) + { + Assert.That(actual.Description, Is.EqualTo(expected.Description)); + Assert.That(actual.BuildMode, Is.EqualTo(expected.BuildMode)); + Assert.That(actual.FieldConfidence, Is.EquivalentTo(expected.FieldConfidence)); + + AreEquivalent(expected.FieldSchema, actual.FieldSchema); + } + public static void AreEquivalent(IReadOnlyDictionary expected, IReadOnlyDictionary actual) { Assert.That(actual.Count, Is.EqualTo(expected.Count)); @@ -76,5 +118,31 @@ public static void AreEquivalent(IReadOnlyDictionary expected, IReadOnlyDictionary actual) + { + Assert.That(actual.Count, Is.EqualTo(expected.Count)); + + foreach (string key in expected.Keys) + { + DocumentFieldSchema expectedFieldSchema = expected[key]; + DocumentFieldSchema fieldSchema = actual[key]; + + AreEqual(expectedFieldSchema, fieldSchema); + } + } + + public static void AreEquivalent(IReadOnlyDictionary expected, IReadOnlyDictionary actual) + { + Assert.That(actual.Count, Is.EqualTo(expected.Count)); + + foreach (string key in expected.Keys) + { + DocumentTypeDetails expectedDocType = expected[key]; + DocumentTypeDetails docType = actual[key]; + + AreEqual(expectedDocType, docType); + } + } } } diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentModelAdministrationClient/DocumentModelAdministrationLiveTests.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentModelAdministrationClient/DocumentModelAdministrationLiveTests.cs index 4a156164e82a..d5771f06071d 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentModelAdministrationClient/DocumentModelAdministrationLiveTests.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentModelAdministrationClient/DocumentModelAdministrationLiveTests.cs @@ -1,6 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System; +using System.Collections.Generic; +using System.Net; +using System.Threading; using System.Threading.Tasks; using Azure.Core.TestFramework; using NUnit.Framework; @@ -9,11 +13,397 @@ namespace Azure.AI.DocumentIntelligence.Tests { public class DocumentModelAdministrationLiveTests : DocumentIntelligenceLiveTestBase { + private static readonly DocumentBuildMode[] s_buildDocumentModelTestCases = new[] + { + DocumentBuildMode.Template, + DocumentBuildMode.Neural + }; + public DocumentModelAdministrationLiveTests(bool isAsync) : base(isAsync) { } + #region Build + + [RecordedTest] + [TestCaseSource(nameof(s_buildDocumentModelTestCases))] + public async Task BuildDocumentWithAzureBlobContentSource(DocumentBuildMode buildMode) + { + if (buildMode == DocumentBuildMode.Neural && Recording.Mode == RecordedTestMode.Live) + { + // Test takes too long to finish running, and seems to cause multiple failures in our + // live test pipeline. For this reason, this test is ignored when running in Live mode. + Assert.Ignore(); + } + + var client = CreateDocumentModelAdministrationClient(); + var modelId = Recording.GenerateId(); + var description = "This classifier was generated by a .NET test."; + var startTime = Recording.UtcNow; + + var containerUrl = new Uri(TestEnvironment.BlobContainerSasUrl); + var prefix = "subfolder"; + var source = new AzureBlobContentSource(containerUrl) { Prefix = prefix }; + + var request = new BuildDocumentModelRequest(modelId, buildMode) + { + AzureBlobSource = source, + Description = description, + Tags = { { "tag1", "value1" }, { "tag2", "value2" } } + }; + + Operation operation = null; + + try + { + operation = await client.BuildDocumentAsync(WaitUntil.Started, request); + + await (buildMode == DocumentBuildMode.Neural + ? operation.WaitForCompletionAsync(TimeSpan.FromMinutes(1), CancellationToken.None) + : operation.WaitForCompletionAsync()); + } + finally + { + if (operation != null && operation.HasCompleted) + { + await client.DeleteModelAsync(modelId); + } + } + + Assert.That(operation.HasCompleted); + Assert.That(operation.HasValue); + + DocumentModelDetails model = operation.Value; + + Assert.That(model.ModelId, Is.EqualTo(modelId)); + Assert.That(model.Description, Is.EqualTo(description)); + Assert.That(model.ApiVersion, Is.EqualTo(ServiceVersionString)); + + // Add a 4-hour tolerance because the model could have been cached before this test. + Assert.That(model.CreatedDateTime, Is.GreaterThan(startTime - TimeSpan.FromHours(4))); + Assert.That(model.ExpirationDateTime, Is.GreaterThan(model.CreatedDateTime)); + Assert.That(model.Tags, Is.EquivalentTo(request.Tags)); + + Assert.That(model.AzureBlobSource, Is.Null); + Assert.That(model.AzureBlobFileListSource, Is.Null); + + Assert.That(model.DocTypes.Count, Is.EqualTo(1)); + Assert.That(model.DocTypes.ContainsKey(modelId)); + + DocumentTypeDetails docType = model.DocTypes[modelId]; + + Assert.That(docType.Description, Is.Null); + Assert.That(docType.BuildMode, Is.EqualTo(buildMode)); + + if (buildMode == DocumentBuildMode.Template) + { + Assert.That(docType.FieldConfidence.Keys, Is.EquivalentTo(docType.FieldSchema.Keys)); + + foreach (float confidence in docType.FieldConfidence.Values) + { + Assert.That(confidence, Is.GreaterThanOrEqualTo(0f)); + Assert.That(confidence, Is.LessThanOrEqualTo(1f)); + } + } + else + { + Assert.That(docType.FieldConfidence, Is.Empty); + } + + foreach (DocumentFieldSchema fieldSchema in docType.FieldSchema.Values) + { + Assert.That(fieldSchema.Description, Is.Null); + Assert.That(fieldSchema.Example, Is.Null); + Assert.That(fieldSchema.Items, Is.Null); + Assert.That(fieldSchema.Properties, Is.Empty); + } + + DocumentFieldSchema merchantSchema = docType.FieldSchema["Merchant"]; + DocumentFieldSchema quantitySchema = docType.FieldSchema["Quantity"]; + + Assert.That(merchantSchema.Type, Is.EqualTo(DocumentFieldType.String)); + Assert.That(quantitySchema.Type, Is.EqualTo(DocumentFieldType.Number)); + } + + [RecordedTest] + public void BuildDocumentCanParseError() + { + var client = CreateDocumentModelAdministrationClient(); + var modelId = Recording.GenerateId(); + + var containerUrl = new Uri(TestEnvironment.BlobContainerSasUrl); + var prefix = "testfolder"; // folder exists but most training files are missing + var source = new AzureBlobContentSource(containerUrl) { Prefix = prefix }; + + var request = new BuildDocumentModelRequest(modelId, DocumentBuildMode.Template) + { + AzureBlobSource = source + }; + + RequestFailedException ex = Assert.ThrowsAsync(async () => await client.BuildDocumentAsync(WaitUntil.Started, request)); + + Assert.That(ex.ErrorCode, Is.EqualTo("InvalidRequest")); + } + + #endregion Build + + #region Copy + + [RecordedTest] + public async Task CopyModelTo() + { + var client = CreateDocumentModelAdministrationClient(); + var modelId = Recording.GenerateId(); + var description = "This model was generated by a .NET test."; + var tags = new Dictionary() { { "tag1", "value1" }, { "tag2", "value2" } }; + var startTime = Recording.UtcNow; + + await using var disposableModel = await BuildDisposableDocumentModelAsync(TestEnvironment.BlobContainerSasUrl); + + var authorizeCopyRequest = new AuthorizeCopyRequest(modelId, description, tags); + + CopyAuthorization copyAuthorization = await client.AuthorizeModelCopyAsync(authorizeCopyRequest); + + Operation operation = null; + + try + { + operation = await client.CopyModelToAsync(WaitUntil.Completed, disposableModel.ModelId, copyAuthorization); + } + finally + { + if (operation != null && operation.HasCompleted) + { + await client.DeleteModelAsync(modelId); + } + } + + Assert.That(operation.HasCompleted); + Assert.That(operation.HasValue); + + DocumentModelDetails sourceModel = disposableModel.Value; + DocumentModelDetails model = operation.Value; + + Assert.That(model.ModelId, Is.EqualTo(modelId)); + Assert.That(model.Description, Is.EqualTo(description)); + Assert.That(model.ApiVersion, Is.EqualTo(ServiceVersionString)); + + // Add a 4-hour tolerance because the model could have been cached before this test. + Assert.That(model.CreatedDateTime, Is.GreaterThan(startTime - TimeSpan.FromHours(4))); + Assert.That(model.ExpirationDateTime, Is.GreaterThan(model.CreatedDateTime)); + Assert.That(model.Tags, Is.EquivalentTo(tags)); + + Assert.That(model.AzureBlobSource, Is.Null); + Assert.That(model.AzureBlobFileListSource, Is.Null); + + // TODO: reenable validation once the following service issue has been fixed: https://github.com/Azure/azure-sdk-for-net/issues/37172 + // DocumentAssert.AreEquivalent(sourceModel.DocTypes, model.DocTypes); + } + + #endregion Copy + + #region Compose + + [RecordedTest] + public async Task ComposeModel() + { + var client = CreateDocumentModelAdministrationClient(); + var modelId = Recording.GenerateId(); + var description = "This model was generated by a .NET test."; + var startTime = Recording.UtcNow; + + // Note: this will fail once we implement model caching. We'll need to set different containers to make it work. + await using var disposableModel0 = await BuildDisposableDocumentModelAsync(TestEnvironment.BlobContainerSasUrl); + await using var disposableModel1 = await BuildDisposableDocumentModelAsync(TestEnvironment.BlobContainerSasUrl); + + var componentModels = new List() + { + new ComponentDocumentModelDetails(disposableModel0.ModelId), + new ComponentDocumentModelDetails(disposableModel1.ModelId) + }; + + var request = new ComposeDocumentModelRequest(modelId, componentModels) + { + Description = description, + Tags = { { "tag1", "value1" }, { "tag2", "value2" } } + }; + + Operation operation = null; + + try + { + operation = await client.ComposeModelAsync(WaitUntil.Completed, request); + } + finally + { + if (operation != null && operation.HasCompleted) + { + await client.DeleteModelAsync(modelId); + } + } + + Assert.That(operation.HasCompleted); + Assert.That(operation.HasValue); + + DocumentModelDetails componentModel0 = disposableModel0.Value; + DocumentModelDetails componentModel1 = disposableModel1.Value; + DocumentModelDetails model = operation.Value; + + Assert.That(model.ModelId, Is.EqualTo(modelId)); + Assert.That(model.Description, Is.EqualTo(description)); + Assert.That(model.ApiVersion, Is.EqualTo(ServiceVersionString)); + + // Add a 4-hour tolerance because the model could have been cached before this test. + Assert.That(model.CreatedDateTime, Is.GreaterThan(startTime - TimeSpan.FromHours(4))); + Assert.That(model.ExpirationDateTime, Is.GreaterThan(model.CreatedDateTime)); + Assert.That(model.Tags, Is.EquivalentTo(request.Tags)); + + Assert.That(model.AzureBlobSource, Is.Null); + Assert.That(model.AzureBlobFileListSource, Is.Null); + + Assert.That(model.DocTypes.Count, Is.EqualTo(2)); + + DocumentTypeDetails expectedDocType0 = componentModel0.DocTypes[componentModel0.ModelId]; + DocumentTypeDetails expectedDocType1 = componentModel1.DocTypes[componentModel1.ModelId]; + DocumentTypeDetails docType0 = model.DocTypes[componentModel0.ModelId]; + DocumentTypeDetails docType1 = model.DocTypes[componentModel1.ModelId]; + + DocumentAssert.AreEqual(expectedDocType0, docType0); + DocumentAssert.AreEqual(expectedDocType1, docType1); + } + + [RecordedTest] + public void ComposeModelCanParseError() + { + var client = CreateDocumentModelAdministrationClient(); + var modelId = Recording.GenerateId(); + + var componentModels = new List() + { + new ComponentDocumentModelDetails("00000000-0000-0000-0000-000000000000"), + new ComponentDocumentModelDetails("00000000-0000-0000-0000-000000000001") + }; + + var request = new ComposeDocumentModelRequest(modelId, componentModels); + + RequestFailedException ex = Assert.ThrowsAsync(async () => await client.ComposeModelAsync(WaitUntil.Started, request)); + + Assert.That(ex.ErrorCode, Is.EqualTo("InvalidRequest")); + } + + #endregion Compose + + #region Get + + [RecordedTest] + public async Task GetModel() + { + var client = CreateDocumentModelAdministrationClient(); + var description = "This model was generated by a .NET test."; + var tags = new Dictionary() { { "tag1", "value1" }, { "tag2", "value2" } }; + + await using var disposableModel = await BuildDisposableDocumentModelAsync(TestEnvironment.BlobContainerSasUrl, description, tags); + + DocumentModelDetails expected = disposableModel.Value; + DocumentModelDetails model = await client.GetModelAsync(disposableModel.ModelId); + + DocumentAssert.AreEqual(expected, model); + } + + [RecordedTest] + public void GetModelCanParseError() + { + var client = CreateDocumentModelAdministrationClient(); + var modelId = "00000000-0000-0000-0000-000000000000"; + + RequestFailedException ex = Assert.ThrowsAsync(async () => await client.GetModelAsync(modelId)); + + Assert.That(ex.ErrorCode, Is.EqualTo("NotFound")); + } + + #endregion Get + + #region List + + [RecordedTest] + public async Task GetModels() + { + var client = CreateDocumentModelAdministrationClient(); + var description = "This model was generated by a .NET test."; + var tags = new Dictionary() { { "tag1", "value1" }, { "tag2", "value2" } }; + + // Once model caching is implemented, we should make the models slightly different to make sure the cache won't return copies of the same model. + await using var disposableModel0 = await BuildDisposableDocumentModelAsync(TestEnvironment.BlobContainerSasUrl, description, tags); + await using var disposableModel1 = await BuildDisposableDocumentModelAsync(TestEnvironment.BlobContainerSasUrl, description, tags); + + var expectedIdMapping = new Dictionary() + { + { disposableModel0.ModelId, disposableModel0.Value }, + { disposableModel1.ModelId, disposableModel1.Value } + }; + var idMapping = new Dictionary(); + + await foreach (DocumentModelSummary model in client.GetModelsAsync()) + { + if (expectedIdMapping.ContainsKey(model.ModelId)) + { + idMapping.Add(model.ModelId, model); + } + + if (idMapping.Count == expectedIdMapping.Count) + { + break; + } + } + + Assert.That(idMapping.Count, Is.EqualTo(expectedIdMapping.Count)); + + foreach (string id in expectedIdMapping.Keys) + { + Assert.That(idMapping, Contains.Key(id)); + + DocumentModelDetails expected = expectedIdMapping[id]; + DocumentModelSummary model = idMapping[id]; + + Assert.That(model.ModelId, Is.EqualTo(expected.ModelId)); + Assert.That(model.Description, Is.EqualTo(expected.Description)); + Assert.That(model.ApiVersion, Is.EqualTo(expected.ApiVersion)); + Assert.That(model.CreatedDateTime, Is.EqualTo(expected.CreatedDateTime)); + Assert.That(model.ExpirationDateTime, Is.EqualTo(expected.ExpirationDateTime)); + Assert.That(model.Tags, Is.EquivalentTo(expected.Tags)); + } + } + + #endregion List + + #region Delete + + [RecordedTest] + public async Task DeleteModel() + { + var client = CreateDocumentModelAdministrationClient(); + + // Once model caching is implemented, make sure we don't cache the model we'll delete, otherwise this may affect other tests. + var disposableModel = await BuildDisposableDocumentModelAsync(TestEnvironment.BlobContainerSasUrl); + var response = await client.DeleteModelAsync(disposableModel.ModelId); + + Assert.That(response.Status, Is.EqualTo((int)HttpStatusCode.NoContent)); + } + + [RecordedTest] + public void DeleteModelCanParseError() + { + var client = CreateDocumentModelAdministrationClient(); + var modelId = "00000000-0000-0000-0000-000000000000"; + + RequestFailedException ex = Assert.ThrowsAsync(async () => await client.DeleteModelAsync(modelId)); + + Assert.That(ex.ErrorCode, Is.EqualTo("NotFound")); + } + + #endregion Delete + [RecordedTest] public async Task AuthorizeModelCopy() { diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DisposableDocumentModel.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DisposableDocumentModel.cs new file mode 100644 index 000000000000..3de29f8d8924 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DisposableDocumentModel.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Threading.Tasks; + +namespace Azure.AI.DocumentIntelligence.Tests +{ + public class DisposableDocumentModel : IAsyncDisposable + { + private readonly DocumentModelAdministrationClient _client; + + private DisposableDocumentModel(DocumentModelAdministrationClient client, Operation operation) + { + _client = client; + Operation = operation; + } + + public Operation Operation { get; } + + public DocumentModelDetails Value => Operation.Value; + + public string ModelId => Value.ModelId; + + public static async Task BuildAsync(DocumentModelAdministrationClient client, BuildDocumentModelRequest buildRequest) + { + Operation operation = await client.BuildDocumentAsync(WaitUntil.Completed, buildRequest); + + return new DisposableDocumentModel(client, operation); + } + + public async ValueTask DisposeAsync() + { + await _client.DeleteModelAsync(Value.ModelId); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceLiveTestBase.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceLiveTestBase.cs index 101ddec9ceed..a3ed51f57558 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceLiveTestBase.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceLiveTestBase.cs @@ -45,6 +45,30 @@ protected DocumentModelAdministrationClient CreateDocumentModelAdministrationCli return InstrumentClient(nonInstrumentedClient); } + protected async Task BuildDisposableDocumentModelAsync(string containerUrlString, string description = null, IReadOnlyDictionary tags = null) + { + var client = CreateDocumentModelAdministrationClient(); + var modelId = Recording.GenerateId(); + var containerUrl = new Uri(containerUrlString); + var source = new AzureBlobContentSource(containerUrl); + + var request = new BuildDocumentModelRequest(modelId, DocumentBuildMode.Template) + { + AzureBlobSource = source, + Description = description + }; + + if (tags != null) + { + foreach (var tag in tags) + { + request.Tags.Add(tag); + } + } + + return await DisposableDocumentModel.BuildAsync(client, request); + } + protected async Task BuildDisposableDocumentClassifierAsync(string description = null) { var client = CreateDocumentModelAdministrationClient(); diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceTestEnvironment.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceTestEnvironment.cs index 0c619064c278..e3ac0356419f 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceTestEnvironment.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceTestEnvironment.cs @@ -17,6 +17,8 @@ public class DocumentIntelligenceTestEnvironment : TestEnvironment public string ResourceRegion => GetRecordedVariable("RESOURCE_REGION"); + public string BlobContainerSasUrl => GetRecordedVariable("SINGLEPAGE_BLOB_CONTAINER_SAS_URL", options => options.IsSecret(SanitizedSasUrl)); + public string ClassifierTrainingSasUrl => GetRecordedVariable("CLASSIFIER_BLOB_CONTAINER_SAS_URL", options => options.IsSecret(SanitizedSasUrl)); } } From cfb803535204d0d16555950ac4b1a49f8314e85f Mon Sep 17 00:00:00 2001 From: Caio Saldanha Date: Thu, 9 Nov 2023 14:36:10 -0800 Subject: [PATCH 4/5] [DocumentIntelligence] Misc operations + classify live tests (#2017) * [DocumentIntelligence] Added admin live tests for misc operations * [DocumentIntelligence] Added main live tests for classifiers --- ....AI.DocumentIntelligence.netstandard2.0.cs | 231 ++++++++- .../src/AnalyzeResult.Serialization.cs | 2 +- .../src/DeserializationHelpers.cs | 4 +- ...DocumentClassifierDetails.Serialization.cs | 2 +- .../src/DocumentModelDetails.Serialization.cs | 2 +- .../AIDocumentIntelligenceModelFactory.cs | 469 ++++++++++++++++++ .../Generated/AddressValue.Serialization.cs | 120 +++++ .../Generated/AnalyzeResult.Serialization.cs | 209 ++++++++ .../AnalyzedDocument.Serialization.cs | 90 ++++ .../Generated/BoundingRegion.Serialization.cs | 53 ++ .../Generated/CurrencyValue.Serialization.cs | 54 ++ .../DocumentBarcode.Serialization.cs | 76 +++ .../src/Generated/DocumentBarcode.cs | 9 +- .../src/Generated/DocumentBarcodeKind.cs | 96 ++++ .../DocumentCaption.Serialization.cs | 91 ++++ .../Generated/DocumentField.Serialization.cs | 228 +++++++++ .../src/Generated/DocumentField.cs | 6 +- .../Generated/DocumentFigure.Serialization.cs | 110 ++++ .../DocumentFootnote.Serialization.cs | 91 ++++ .../DocumentFormula.Serialization.cs | 76 +++ .../src/Generated/DocumentFormula.cs | 9 +- .../src/Generated/DocumentFormulaKind.cs | 51 ++ .../DocumentKeyValueElement.Serialization.cs | 69 +++ .../DocumentKeyValuePair.Serialization.cs | 58 +++ .../DocumentLanguage.Serialization.cs | 59 +++ .../Generated/DocumentLine.Serialization.cs | 69 +++ .../Generated/DocumentList.Serialization.cs | 58 +++ .../DocumentListItem.Serialization.cs | 97 ++++ .../Generated/DocumentPage.Serialization.cs | 169 +++++++ .../src/Generated/DocumentPage.cs | 4 +- .../DocumentParagraph.Serialization.cs | 79 +++ .../src/Generated/DocumentParagraph.cs | 4 +- .../DocumentSection.Serialization.cs | 70 +++ .../DocumentSelectionMark.Serialization.cs | 70 +++ .../src/Generated/DocumentSelectionMark.cs | 9 +- .../Generated/DocumentSelectionMarkState.cs | 54 ++ .../src/Generated/DocumentSignatureType.cs | 51 ++ .../Generated/DocumentSpan.Serialization.cs | 47 ++ .../Generated/DocumentStyle.Serialization.cs | 102 ++++ .../src/Generated/DocumentStyle.cs | 6 +- .../Generated/DocumentTable.Serialization.cs | 111 +++++ .../DocumentTableCell.Serialization.cs | 133 +++++ .../src/Generated/DocumentTableCell.cs | 4 +- .../src/Generated/DocumentTableCellKind.cs | 60 +++ .../Generated/DocumentWord.Serialization.cs | 70 +++ .../src/Generated/FontStyle.cs | 51 ++ .../src/Generated/FontWeight.cs | 51 ++ .../src/Generated/LengthUnit.cs | 51 ++ .../src/Generated/ParagraphRole.cs | 66 +++ .../tests/Assets/IRS-1040_2.pdf | Bin 0 -> 175340 bytes .../tests/Assets/blank.pdf | Bin 0 -> 25662 bytes .../DocumentClassifierLiveTests.cs | 149 ++++++ .../MiscellaneousOperationsLiveTests.cs | 189 +++++++ .../DocumentIntelligenceLiveTestBase.cs | 10 + .../DocumentIntelligenceTestEnvironment.cs | 14 + .../tests/Infrastructure/TestFile.cs | 12 + .../tsp-location.yaml | 2 +- 57 files changed, 4084 insertions(+), 43 deletions(-) create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AddressValue.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AnalyzeResult.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AnalyzedDocument.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/BoundingRegion.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/CurrencyValue.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentBarcode.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentBarcodeKind.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentCaption.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentField.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFigure.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFootnote.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFormula.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFormulaKind.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentKeyValueElement.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentKeyValuePair.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentLanguage.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentLine.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentList.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentListItem.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentPage.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentParagraph.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSection.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSelectionMark.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSelectionMarkState.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSignatureType.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSpan.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentStyle.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTable.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTableCell.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTableCellKind.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentWord.Serialization.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/FontStyle.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/FontWeight.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/LengthUnit.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ParagraphRole.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Assets/IRS-1040_2.pdf create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Assets/blank.pdf create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentAnalysisClient/DocumentClassifierLiveTests.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentModelAdministrationClient/MiscellaneousOperationsLiveTests.cs create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/TestFile.cs diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/api/Azure.AI.DocumentIntelligence.netstandard2.0.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/api/Azure.AI.DocumentIntelligence.netstandard2.0.cs index daf525b3d5dd..e52d486aea6c 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/api/Azure.AI.DocumentIntelligence.netstandard2.0.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/api/Azure.AI.DocumentIntelligence.netstandard2.0.cs @@ -20,19 +20,45 @@ internal AddressValue() { } } public static partial class AIDocumentIntelligenceModelFactory { + public static Azure.AI.DocumentIntelligence.AddressValue AddressValue(string houseNumber = null, string poBox = null, string road = null, string city = null, string state = null, string postalCode = null, string countryRegion = null, string streetAddress = null, string unit = null, string cityDistrict = null, string stateDistrict = null, string suburb = null, string house = null, string level = null) { throw null; } + public static Azure.AI.DocumentIntelligence.AnalyzedDocument AnalyzedDocument(string docType = null, System.Collections.Generic.IEnumerable boundingRegions = null, System.Collections.Generic.IEnumerable spans = null, System.Collections.Generic.IReadOnlyDictionary fields = null, float confidence = 0f) { throw null; } + public static Azure.AI.DocumentIntelligence.AnalyzeResult AnalyzeResult(string apiVersion = null, string modelId = null, Azure.AI.DocumentIntelligence.StringIndexType stringIndexType = default(Azure.AI.DocumentIntelligence.StringIndexType), Azure.AI.DocumentIntelligence.ContentFormat? contentFormat = default(Azure.AI.DocumentIntelligence.ContentFormat?), string content = null, System.Collections.Generic.IEnumerable pages = null, System.Collections.Generic.IEnumerable paragraphs = null, System.Collections.Generic.IEnumerable tables = null, System.Collections.Generic.IEnumerable figures = null, System.Collections.Generic.IEnumerable lists = null, System.Collections.Generic.IEnumerable sections = null, System.Collections.Generic.IEnumerable keyValuePairs = null, System.Collections.Generic.IEnumerable styles = null, System.Collections.Generic.IEnumerable languages = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } + public static Azure.AI.DocumentIntelligence.BoundingRegion BoundingRegion(int pageNumber = 0, System.Collections.Generic.IEnumerable polygon = null) { throw null; } public static Azure.AI.DocumentIntelligence.ChatIndexBuildOperationDetails ChatIndexBuildOperationDetails(System.Guid operationId = default(System.Guid), Azure.AI.DocumentIntelligence.OperationStatus status = default(Azure.AI.DocumentIntelligence.OperationStatus), int? percentCompleted = default(int?), System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.Uri resourceLocation = null, string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary tags = null, Azure.AI.DocumentIntelligence.DocumentIntelligenceError error = null, Azure.AI.DocumentIntelligence.ChatIndexDetails result = null) { throw null; } public static Azure.AI.DocumentIntelligence.ChatIndexDetails ChatIndexDetails(string chatId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset expirationDateTime = default(System.DateTimeOffset), string apiVersion = null) { throw null; } + public static Azure.AI.DocumentIntelligence.CurrencyValue CurrencyValue(double amount = 0, string currencySymbol = null, string currencyCode = null) { throw null; } public static Azure.AI.DocumentIntelligence.CustomDocumentModelsDetails CustomDocumentModelsDetails(int count = 0, int limit = 0) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentBarcode DocumentBarcode(Azure.AI.DocumentIntelligence.DocumentBarcodeKind kind = default(Azure.AI.DocumentIntelligence.DocumentBarcodeKind), string value = null, System.Collections.Generic.IEnumerable polygon = null, Azure.AI.DocumentIntelligence.DocumentSpan span = null, float confidence = 0f) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentCaption DocumentCaption(string content = null, System.Collections.Generic.IEnumerable boundingRegions = null, System.Collections.Generic.IEnumerable spans = null, System.Collections.Generic.IEnumerable elements = null) { throw null; } public static Azure.AI.DocumentIntelligence.DocumentClassifierBuildOperationDetails DocumentClassifierBuildOperationDetails(System.Guid operationId = default(System.Guid), Azure.AI.DocumentIntelligence.OperationStatus status = default(Azure.AI.DocumentIntelligence.OperationStatus), int? percentCompleted = default(int?), System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.Uri resourceLocation = null, string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary tags = null, Azure.AI.DocumentIntelligence.DocumentIntelligenceError error = null, Azure.AI.DocumentIntelligence.DocumentClassifierDetails result = null) { throw null; } public static Azure.AI.DocumentIntelligence.DocumentClassifierDetails DocumentClassifierDetails(string classifierId = null, string description = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary docTypes = null) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentField DocumentField(Azure.AI.DocumentIntelligence.DocumentFieldType type = default(Azure.AI.DocumentIntelligence.DocumentFieldType), string valueString = null, System.DateTimeOffset? valueDate = default(System.DateTimeOffset?), System.TimeSpan? valueTime = default(System.TimeSpan?), string valuePhoneNumber = null, double? valueNumber = default(double?), long? valueInteger = default(long?), Azure.AI.DocumentIntelligence.DocumentSelectionMarkState? valueSelectionMark = default(Azure.AI.DocumentIntelligence.DocumentSelectionMarkState?), Azure.AI.DocumentIntelligence.DocumentSignatureType? valueSignature = default(Azure.AI.DocumentIntelligence.DocumentSignatureType?), string valueCountryRegion = null, System.Collections.Generic.IEnumerable valueArray = null, System.Collections.Generic.IReadOnlyDictionary valueObject = null, Azure.AI.DocumentIntelligence.CurrencyValue valueCurrency = null, Azure.AI.DocumentIntelligence.AddressValue valueAddress = null, bool? valueBoolean = default(bool?), string content = null, System.Collections.Generic.IEnumerable boundingRegions = null, System.Collections.Generic.IEnumerable spans = null, float? confidence = default(float?)) { throw null; } public static Azure.AI.DocumentIntelligence.DocumentFieldSchema DocumentFieldSchema(Azure.AI.DocumentIntelligence.DocumentFieldType type = default(Azure.AI.DocumentIntelligence.DocumentFieldType), string description = null, string example = null, Azure.AI.DocumentIntelligence.DocumentFieldSchema items = null, System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentFigure DocumentFigure(System.Collections.Generic.IEnumerable boundingRegions = null, System.Collections.Generic.IEnumerable spans = null, System.Collections.Generic.IEnumerable elements = null, Azure.AI.DocumentIntelligence.DocumentCaption caption = null, System.Collections.Generic.IEnumerable footnotes = null) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentFootnote DocumentFootnote(string content = null, System.Collections.Generic.IEnumerable boundingRegions = null, System.Collections.Generic.IEnumerable spans = null, System.Collections.Generic.IEnumerable elements = null) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentFormula DocumentFormula(Azure.AI.DocumentIntelligence.DocumentFormulaKind kind = default(Azure.AI.DocumentIntelligence.DocumentFormulaKind), string value = null, System.Collections.Generic.IEnumerable polygon = null, Azure.AI.DocumentIntelligence.DocumentSpan span = null, float confidence = 0f) { throw null; } public static Azure.AI.DocumentIntelligence.DocumentIntelligenceError DocumentIntelligenceError(string code = null, string message = null, string target = null, System.Collections.Generic.IEnumerable details = null, Azure.AI.DocumentIntelligence.InnerError innererror = null) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentKeyValueElement DocumentKeyValueElement(string content = null, System.Collections.Generic.IEnumerable boundingRegions = null, System.Collections.Generic.IEnumerable spans = null) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentKeyValuePair DocumentKeyValuePair(Azure.AI.DocumentIntelligence.DocumentKeyValueElement key = null, Azure.AI.DocumentIntelligence.DocumentKeyValueElement value = null, float confidence = 0f) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentLanguage DocumentLanguage(string locale = null, System.Collections.Generic.IEnumerable spans = null, float confidence = 0f) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentLine DocumentLine(string content = null, System.Collections.Generic.IEnumerable polygon = null, System.Collections.Generic.IEnumerable spans = null) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentList DocumentList(System.Collections.Generic.IEnumerable spans = null, System.Collections.Generic.IEnumerable items = null) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentListItem DocumentListItem(int level = 0, string content = null, System.Collections.Generic.IEnumerable boundingRegions = null, System.Collections.Generic.IEnumerable spans = null, System.Collections.Generic.IEnumerable elements = null) { throw null; } public static Azure.AI.DocumentIntelligence.DocumentModelBuildOperationDetails DocumentModelBuildOperationDetails(System.Guid operationId = default(System.Guid), Azure.AI.DocumentIntelligence.OperationStatus status = default(Azure.AI.DocumentIntelligence.OperationStatus), int? percentCompleted = default(int?), System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.Uri resourceLocation = null, string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary tags = null, Azure.AI.DocumentIntelligence.DocumentIntelligenceError error = null, Azure.AI.DocumentIntelligence.DocumentModelDetails result = null) { throw null; } public static Azure.AI.DocumentIntelligence.DocumentModelComposeOperationDetails DocumentModelComposeOperationDetails(System.Guid operationId = default(System.Guid), Azure.AI.DocumentIntelligence.OperationStatus status = default(Azure.AI.DocumentIntelligence.OperationStatus), int? percentCompleted = default(int?), System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.Uri resourceLocation = null, string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary tags = null, Azure.AI.DocumentIntelligence.DocumentIntelligenceError error = null, Azure.AI.DocumentIntelligence.DocumentModelDetails result = null) { throw null; } public static Azure.AI.DocumentIntelligence.DocumentModelCopyToOperationDetails DocumentModelCopyToOperationDetails(System.Guid operationId = default(System.Guid), Azure.AI.DocumentIntelligence.OperationStatus status = default(Azure.AI.DocumentIntelligence.OperationStatus), int? percentCompleted = default(int?), System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.Uri resourceLocation = null, string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary tags = null, Azure.AI.DocumentIntelligence.DocumentIntelligenceError error = null, Azure.AI.DocumentIntelligence.DocumentModelDetails result = null) { throw null; } public static Azure.AI.DocumentIntelligence.DocumentModelDetails DocumentModelDetails(string modelId = null, string description = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary tags = null, Azure.AI.DocumentIntelligence.DocumentBuildMode buildMode = default(Azure.AI.DocumentIntelligence.DocumentBuildMode), Azure.AI.DocumentIntelligence.AzureBlobContentSource azureBlobSource = null, Azure.AI.DocumentIntelligence.AzureBlobFileListContentSource azureBlobFileListSource = null, System.Collections.Generic.IReadOnlyDictionary docTypes = null) { throw null; } public static Azure.AI.DocumentIntelligence.DocumentModelSummary DocumentModelSummary(string modelId = null, string description = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary tags = null) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentPage DocumentPage(int pageNumber = 0, float? angle = default(float?), float? width = default(float?), float? height = default(float?), Azure.AI.DocumentIntelligence.LengthUnit? unit = default(Azure.AI.DocumentIntelligence.LengthUnit?), System.Collections.Generic.IEnumerable spans = null, System.Collections.Generic.IEnumerable words = null, System.Collections.Generic.IEnumerable selectionMarks = null, System.Collections.Generic.IEnumerable lines = null, System.Collections.Generic.IEnumerable barcodes = null, System.Collections.Generic.IEnumerable formulas = null) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentParagraph DocumentParagraph(Azure.AI.DocumentIntelligence.ParagraphRole? role = default(Azure.AI.DocumentIntelligence.ParagraphRole?), string content = null, System.Collections.Generic.IEnumerable boundingRegions = null, System.Collections.Generic.IEnumerable spans = null) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentSection DocumentSection(System.Collections.Generic.IEnumerable spans = null, System.Collections.Generic.IEnumerable elements = null) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentSelectionMark DocumentSelectionMark(Azure.AI.DocumentIntelligence.DocumentSelectionMarkState state = default(Azure.AI.DocumentIntelligence.DocumentSelectionMarkState), System.Collections.Generic.IEnumerable polygon = null, Azure.AI.DocumentIntelligence.DocumentSpan span = null, float confidence = 0f) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentSpan DocumentSpan(int offset = 0, int length = 0) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentStyle DocumentStyle(bool? isHandwritten = default(bool?), string similarFontFamily = null, Azure.AI.DocumentIntelligence.FontStyle? fontStyle = default(Azure.AI.DocumentIntelligence.FontStyle?), Azure.AI.DocumentIntelligence.FontWeight? fontWeight = default(Azure.AI.DocumentIntelligence.FontWeight?), string color = null, string backgroundColor = null, System.Collections.Generic.IEnumerable spans = null, float confidence = 0f) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentTable DocumentTable(int rowCount = 0, int columnCount = 0, System.Collections.Generic.IEnumerable cells = null, System.Collections.Generic.IEnumerable boundingRegions = null, System.Collections.Generic.IEnumerable spans = null, Azure.AI.DocumentIntelligence.DocumentCaption caption = null, System.Collections.Generic.IEnumerable footnotes = null) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentTableCell DocumentTableCell(Azure.AI.DocumentIntelligence.DocumentTableCellKind? kind = default(Azure.AI.DocumentIntelligence.DocumentTableCellKind?), int rowIndex = 0, int columnIndex = 0, int? rowSpan = default(int?), int? columnSpan = default(int?), string content = null, System.Collections.Generic.IEnumerable boundingRegions = null, System.Collections.Generic.IEnumerable spans = null, System.Collections.Generic.IEnumerable elements = null) { throw null; } public static Azure.AI.DocumentIntelligence.DocumentTypeDetails DocumentTypeDetails(string description = null, Azure.AI.DocumentIntelligence.DocumentBuildMode? buildMode = default(Azure.AI.DocumentIntelligence.DocumentBuildMode?), System.Collections.Generic.IReadOnlyDictionary fieldSchema = null, System.Collections.Generic.IReadOnlyDictionary fieldConfidence = null) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentWord DocumentWord(string content = null, System.Collections.Generic.IEnumerable polygon = null, Azure.AI.DocumentIntelligence.DocumentSpan span = null, float confidence = 0f) { throw null; } public static Azure.AI.DocumentIntelligence.InnerError InnerError(string code = null, string message = null, Azure.AI.DocumentIntelligence.InnerError innererror = null) { throw null; } public static Azure.AI.DocumentIntelligence.OperationDetails OperationDetails(System.Guid operationId = default(System.Guid), Azure.AI.DocumentIntelligence.OperationStatus status = default(Azure.AI.DocumentIntelligence.OperationStatus), int? percentCompleted = default(int?), System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), string kind = "Unknown", System.Uri resourceLocation = null, string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary tags = null, Azure.AI.DocumentIntelligence.DocumentIntelligenceError error = null) { throw null; } public static Azure.AI.DocumentIntelligence.OperationSummary OperationSummary(System.Guid operationId = default(System.Guid), Azure.AI.DocumentIntelligence.OperationStatus status = default(Azure.AI.DocumentIntelligence.OperationStatus), int? percentCompleted = default(int?), System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), Azure.AI.DocumentIntelligence.OperationKind kind = default(Azure.AI.DocumentIntelligence.OperationKind), System.Uri resourceLocation = null, string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary tags = null) { throw null; } @@ -271,12 +297,45 @@ public partial class DocumentBarcode { internal DocumentBarcode() { } public float Confidence { get { throw null; } } - public string Kind { get { throw null; } } + public Azure.AI.DocumentIntelligence.DocumentBarcodeKind Kind { get { throw null; } } public System.Collections.Generic.IReadOnlyList Polygon { get { throw null; } } public Azure.AI.DocumentIntelligence.DocumentSpan Span { get { throw null; } } public string Value { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DocumentBarcodeKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DocumentBarcodeKind(string value) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentBarcodeKind Aztec { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentBarcodeKind Codabar { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentBarcodeKind Code128 { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentBarcodeKind Code39 { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentBarcodeKind Code93 { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentBarcodeKind DataBar { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentBarcodeKind DataBarExpanded { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentBarcodeKind DataMatrix { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentBarcodeKind EAN13 { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentBarcodeKind EAN8 { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentBarcodeKind ITF { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentBarcodeKind MaxiCode { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentBarcodeKind MicroQRCode { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentBarcodeKind PDF417 { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentBarcodeKind QRCode { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentBarcodeKind UPCA { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentBarcodeKind UPCE { get { throw null; } } + public bool Equals(Azure.AI.DocumentIntelligence.DocumentBarcodeKind other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.DocumentIntelligence.DocumentBarcodeKind left, Azure.AI.DocumentIntelligence.DocumentBarcodeKind right) { throw null; } + public static implicit operator Azure.AI.DocumentIntelligence.DocumentBarcodeKind (string value) { throw null; } + public static bool operator !=(Azure.AI.DocumentIntelligence.DocumentBarcodeKind left, Azure.AI.DocumentIntelligence.DocumentBarcodeKind right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DocumentBuildMode : System.IEquatable { private readonly object _dummy; @@ -335,8 +394,8 @@ internal DocumentField() { } public double? ValueNumber { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary ValueObject { get { throw null; } } public string ValuePhoneNumber { get { throw null; } } - public string ValueSelectionMark { get { throw null; } } - public string ValueSignature { get { throw null; } } + public Azure.AI.DocumentIntelligence.DocumentSelectionMarkState? ValueSelectionMark { get { throw null; } } + public Azure.AI.DocumentIntelligence.DocumentSignatureType? ValueSignature { get { throw null; } } public string ValueString { get { throw null; } } public System.TimeSpan? ValueTime { get { throw null; } } } @@ -400,11 +459,29 @@ public partial class DocumentFormula { internal DocumentFormula() { } public float Confidence { get { throw null; } } - public string Kind { get { throw null; } } + public Azure.AI.DocumentIntelligence.DocumentFormulaKind Kind { get { throw null; } } public System.Collections.Generic.IReadOnlyList Polygon { get { throw null; } } public Azure.AI.DocumentIntelligence.DocumentSpan Span { get { throw null; } } public string Value { get { throw null; } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DocumentFormulaKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DocumentFormulaKind(string value) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentFormulaKind Display { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentFormulaKind Inline { get { throw null; } } + public bool Equals(Azure.AI.DocumentIntelligence.DocumentFormulaKind other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.DocumentIntelligence.DocumentFormulaKind left, Azure.AI.DocumentIntelligence.DocumentFormulaKind right) { throw null; } + public static implicit operator Azure.AI.DocumentIntelligence.DocumentFormulaKind (string value) { throw null; } + public static bool operator !=(Azure.AI.DocumentIntelligence.DocumentFormulaKind left, Azure.AI.DocumentIntelligence.DocumentFormulaKind right) { throw null; } + public override string ToString() { throw null; } + } public partial class DocumentIntelligenceError { internal DocumentIntelligenceError() { } @@ -560,7 +637,7 @@ internal DocumentPage() { } public int PageNumber { get { throw null; } } public System.Collections.Generic.IReadOnlyList SelectionMarks { get { throw null; } } public System.Collections.Generic.IReadOnlyList Spans { get { throw null; } } - public string Unit { get { throw null; } } + public Azure.AI.DocumentIntelligence.LengthUnit? Unit { get { throw null; } } public float? Width { get { throw null; } } public System.Collections.Generic.IReadOnlyList Words { get { throw null; } } } @@ -569,7 +646,7 @@ public partial class DocumentParagraph internal DocumentParagraph() { } public System.Collections.Generic.IReadOnlyList BoundingRegions { get { throw null; } } public string Content { get { throw null; } } - public string Role { get { throw null; } } + public Azure.AI.DocumentIntelligence.ParagraphRole? Role { get { throw null; } } public System.Collections.Generic.IReadOnlyList Spans { get { throw null; } } } public partial class DocumentSection @@ -584,7 +661,43 @@ internal DocumentSelectionMark() { } public float Confidence { get { throw null; } } public System.Collections.Generic.IReadOnlyList Polygon { get { throw null; } } public Azure.AI.DocumentIntelligence.DocumentSpan Span { get { throw null; } } - public string State { get { throw null; } } + public Azure.AI.DocumentIntelligence.DocumentSelectionMarkState State { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DocumentSelectionMarkState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DocumentSelectionMarkState(string value) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentSelectionMarkState Selected { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentSelectionMarkState Unselected { get { throw null; } } + public bool Equals(Azure.AI.DocumentIntelligence.DocumentSelectionMarkState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.DocumentIntelligence.DocumentSelectionMarkState left, Azure.AI.DocumentIntelligence.DocumentSelectionMarkState right) { throw null; } + public static implicit operator Azure.AI.DocumentIntelligence.DocumentSelectionMarkState (string value) { throw null; } + public static bool operator !=(Azure.AI.DocumentIntelligence.DocumentSelectionMarkState left, Azure.AI.DocumentIntelligence.DocumentSelectionMarkState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DocumentSignatureType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DocumentSignatureType(string value) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentSignatureType Signed { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentSignatureType Unsigned { get { throw null; } } + public bool Equals(Azure.AI.DocumentIntelligence.DocumentSignatureType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.DocumentIntelligence.DocumentSignatureType left, Azure.AI.DocumentIntelligence.DocumentSignatureType right) { throw null; } + public static implicit operator Azure.AI.DocumentIntelligence.DocumentSignatureType (string value) { throw null; } + public static bool operator !=(Azure.AI.DocumentIntelligence.DocumentSignatureType left, Azure.AI.DocumentIntelligence.DocumentSignatureType right) { throw null; } + public override string ToString() { throw null; } } public partial class DocumentSpan { @@ -598,8 +711,8 @@ internal DocumentStyle() { } public string BackgroundColor { get { throw null; } } public string Color { get { throw null; } } public float Confidence { get { throw null; } } - public string FontStyle { get { throw null; } } - public string FontWeight { get { throw null; } } + public Azure.AI.DocumentIntelligence.FontStyle? FontStyle { get { throw null; } } + public Azure.AI.DocumentIntelligence.FontWeight? FontWeight { get { throw null; } } public bool? IsHandwritten { get { throw null; } } public string SimilarFontFamily { get { throw null; } } public System.Collections.Generic.IReadOnlyList Spans { get { throw null; } } @@ -623,11 +736,32 @@ internal DocumentTableCell() { } public int? ColumnSpan { get { throw null; } } public string Content { get { throw null; } } public System.Collections.Generic.IReadOnlyList Elements { get { throw null; } } - public string Kind { get { throw null; } } + public Azure.AI.DocumentIntelligence.DocumentTableCellKind? Kind { get { throw null; } } public int RowIndex { get { throw null; } } public int? RowSpan { get { throw null; } } public System.Collections.Generic.IReadOnlyList Spans { get { throw null; } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DocumentTableCellKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DocumentTableCellKind(string value) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentTableCellKind ColumnHeader { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentTableCellKind Content { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentTableCellKind Description { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentTableCellKind RowHeader { get { throw null; } } + public static Azure.AI.DocumentIntelligence.DocumentTableCellKind StubHead { get { throw null; } } + public bool Equals(Azure.AI.DocumentIntelligence.DocumentTableCellKind other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.DocumentIntelligence.DocumentTableCellKind left, Azure.AI.DocumentIntelligence.DocumentTableCellKind right) { throw null; } + public static implicit operator Azure.AI.DocumentIntelligence.DocumentTableCellKind (string value) { throw null; } + public static bool operator !=(Azure.AI.DocumentIntelligence.DocumentTableCellKind left, Azure.AI.DocumentIntelligence.DocumentTableCellKind right) { throw null; } + public override string ToString() { throw null; } + } public partial class DocumentTypeDetails { internal DocumentTypeDetails() { } @@ -644,6 +778,42 @@ internal DocumentWord() { } public System.Collections.Generic.IReadOnlyList Polygon { get { throw null; } } public Azure.AI.DocumentIntelligence.DocumentSpan Span { get { throw null; } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FontStyle : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FontStyle(string value) { throw null; } + public static Azure.AI.DocumentIntelligence.FontStyle Italic { get { throw null; } } + public static Azure.AI.DocumentIntelligence.FontStyle Normal { get { throw null; } } + public bool Equals(Azure.AI.DocumentIntelligence.FontStyle other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.DocumentIntelligence.FontStyle left, Azure.AI.DocumentIntelligence.FontStyle right) { throw null; } + public static implicit operator Azure.AI.DocumentIntelligence.FontStyle (string value) { throw null; } + public static bool operator !=(Azure.AI.DocumentIntelligence.FontStyle left, Azure.AI.DocumentIntelligence.FontStyle right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FontWeight : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FontWeight(string value) { throw null; } + public static Azure.AI.DocumentIntelligence.FontWeight Bold { get { throw null; } } + public static Azure.AI.DocumentIntelligence.FontWeight Normal { get { throw null; } } + public bool Equals(Azure.AI.DocumentIntelligence.FontWeight other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.DocumentIntelligence.FontWeight left, Azure.AI.DocumentIntelligence.FontWeight right) { throw null; } + public static implicit operator Azure.AI.DocumentIntelligence.FontWeight (string value) { throw null; } + public static bool operator !=(Azure.AI.DocumentIntelligence.FontWeight left, Azure.AI.DocumentIntelligence.FontWeight right) { throw null; } + public override string ToString() { throw null; } + } public partial class InnerError { internal InnerError() { } @@ -651,6 +821,24 @@ internal InnerError() { } public Azure.AI.DocumentIntelligence.InnerError Innererror { get { throw null; } } public string Message { get { throw null; } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct LengthUnit : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public LengthUnit(string value) { throw null; } + public static Azure.AI.DocumentIntelligence.LengthUnit Inch { get { throw null; } } + public static Azure.AI.DocumentIntelligence.LengthUnit Pixel { get { throw null; } } + public bool Equals(Azure.AI.DocumentIntelligence.LengthUnit other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.DocumentIntelligence.LengthUnit left, Azure.AI.DocumentIntelligence.LengthUnit right) { throw null; } + public static implicit operator Azure.AI.DocumentIntelligence.LengthUnit (string value) { throw null; } + public static bool operator !=(Azure.AI.DocumentIntelligence.LengthUnit left, Azure.AI.DocumentIntelligence.LengthUnit right) { throw null; } + public override string ToString() { throw null; } + } public abstract partial class OperationDetails { protected OperationDetails(Azure.AI.DocumentIntelligence.OperationStatus status, System.DateTimeOffset createdDateTime, System.DateTimeOffset lastUpdatedDateTime, System.Uri resourceLocation) { } @@ -719,6 +907,29 @@ internal OperationSummary() { } public Azure.AI.DocumentIntelligence.OperationStatus Status { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ParagraphRole : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ParagraphRole(string value) { throw null; } + public static Azure.AI.DocumentIntelligence.ParagraphRole Footnote { get { throw null; } } + public static Azure.AI.DocumentIntelligence.ParagraphRole FormulaBlock { get { throw null; } } + public static Azure.AI.DocumentIntelligence.ParagraphRole PageFooter { get { throw null; } } + public static Azure.AI.DocumentIntelligence.ParagraphRole PageHeader { get { throw null; } } + public static Azure.AI.DocumentIntelligence.ParagraphRole PageNumber { get { throw null; } } + public static Azure.AI.DocumentIntelligence.ParagraphRole SectionHeading { get { throw null; } } + public static Azure.AI.DocumentIntelligence.ParagraphRole Title { get { throw null; } } + public bool Equals(Azure.AI.DocumentIntelligence.ParagraphRole other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.DocumentIntelligence.ParagraphRole left, Azure.AI.DocumentIntelligence.ParagraphRole right) { throw null; } + public static implicit operator Azure.AI.DocumentIntelligence.ParagraphRole (string value) { throw null; } + public static bool operator !=(Azure.AI.DocumentIntelligence.ParagraphRole left, Azure.AI.DocumentIntelligence.ParagraphRole right) { throw null; } + public override string ToString() { throw null; } + } public partial class QuotaDetails { internal QuotaDetails() { } diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/AnalyzeResult.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/AnalyzeResult.Serialization.cs index 0f077e9d7eb8..8759380c6140 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/AnalyzeResult.Serialization.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/AnalyzeResult.Serialization.cs @@ -13,7 +13,7 @@ public partial class AnalyzeResult /// The response to deserialize the model from. internal static AnalyzeResult FromResponse(Response response) { - return null; + return DeserializationHelpers.FromOperationResponse(response, DeserializeAnalyzeResult, "analyzeResult"); } } } diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/DeserializationHelpers.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/DeserializationHelpers.cs index 571fa6195472..560291a68f7f 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/DeserializationHelpers.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/DeserializationHelpers.cs @@ -8,7 +8,7 @@ namespace Azure.AI.DocumentIntelligence { internal static class DeserializationHelpers { - internal static T FromOperationResponse(Response response, Func deserializationFunc) + internal static T FromOperationResponse(Response response, Func deserializationFunc, string resultPropertyName) { using var document = JsonDocument.Parse(response.Content); @@ -16,7 +16,7 @@ internal static T FromOperationResponse(Response response, Func The response to deserialize the model from. internal static DocumentClassifierDetails FromResponse(Response response) { - return DeserializationHelpers.FromOperationResponse(response, DeserializeDocumentClassifierDetails); + return DeserializationHelpers.FromOperationResponse(response, DeserializeDocumentClassifierDetails, "result"); } } } diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/DocumentModelDetails.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/DocumentModelDetails.Serialization.cs index 45b670a43800..af4316336885 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/DocumentModelDetails.Serialization.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/DocumentModelDetails.Serialization.cs @@ -9,7 +9,7 @@ public partial class DocumentModelDetails /// The response to deserialize the model from. internal static new DocumentModelDetails FromResponse(Response response) { - return DeserializationHelpers.FromOperationResponse(response, DeserializeDocumentModelDetails); + return DeserializationHelpers.FromOperationResponse(response, DeserializeDocumentModelDetails, "result"); } } } diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AIDocumentIntelligenceModelFactory.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AIDocumentIntelligenceModelFactory.cs index aebd057f81eb..bb71a5d7c0f0 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AIDocumentIntelligenceModelFactory.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AIDocumentIntelligenceModelFactory.cs @@ -14,6 +14,475 @@ namespace Azure.AI.DocumentIntelligence /// Model factory for models. public static partial class AIDocumentIntelligenceModelFactory { + /// Initializes a new instance of AnalyzeResult. + /// API version used to produce this result. + /// Document model ID used to produce this result. + /// Method used to compute string offset and length. + /// Format of the analyze result top-level content. + /// + /// Concatenate string representation of all textual and visual elements in reading + /// order. + /// + /// Analyzed pages. + /// Extracted paragraphs. + /// Extracted tables. + /// Extracted figures. + /// Extracted lists. + /// Extracted sections. + /// Extracted key-value pairs. + /// Extracted font styles. + /// Detected languages. + /// Extracted documents. + /// A new instance for mocking. + public static AnalyzeResult AnalyzeResult(string apiVersion = null, string modelId = null, StringIndexType stringIndexType = default, ContentFormat? contentFormat = null, string content = null, IEnumerable pages = null, IEnumerable paragraphs = null, IEnumerable tables = null, IEnumerable figures = null, IEnumerable lists = null, IEnumerable sections = null, IEnumerable keyValuePairs = null, IEnumerable styles = null, IEnumerable languages = null, IEnumerable documents = null) + { + pages ??= new List(); + paragraphs ??= new List(); + tables ??= new List(); + figures ??= new List(); + lists ??= new List(); + sections ??= new List(); + keyValuePairs ??= new List(); + styles ??= new List(); + languages ??= new List(); + documents ??= new List(); + + return new AnalyzeResult(apiVersion, modelId, stringIndexType, contentFormat, content, pages?.ToList(), paragraphs?.ToList(), tables?.ToList(), figures?.ToList(), lists?.ToList(), sections?.ToList(), keyValuePairs?.ToList(), styles?.ToList(), languages?.ToList(), documents?.ToList()); + } + + /// Initializes a new instance of DocumentPage. + /// 1-based page number in the input document. + /// + /// The general orientation of the content in clockwise direction, measured in + /// degrees between (-180, 180]. + /// + /// The width of the image/PDF in pixels/inches, respectively. + /// The height of the image/PDF in pixels/inches, respectively. + /// + /// The unit used by the width, height, and polygon properties. For images, the + /// unit is "pixel". For PDF, the unit is "inch". + /// + /// Location of the page in the reading order concatenated content. + /// Extracted words from the page. + /// Extracted selection marks from the page. + /// + /// Extracted lines from the page, potentially containing both textual and visual + /// elements. + /// + /// Extracted barcodes from the page. + /// Extracted formulas from the page. + /// A new instance for mocking. + public static DocumentPage DocumentPage(int pageNumber = default, float? angle = null, float? width = null, float? height = null, LengthUnit? unit = null, IEnumerable spans = null, IEnumerable words = null, IEnumerable selectionMarks = null, IEnumerable lines = null, IEnumerable barcodes = null, IEnumerable formulas = null) + { + spans ??= new List(); + words ??= new List(); + selectionMarks ??= new List(); + lines ??= new List(); + barcodes ??= new List(); + formulas ??= new List(); + + return new DocumentPage(pageNumber, angle, width, height, unit, spans?.ToList(), words?.ToList(), selectionMarks?.ToList(), lines?.ToList(), barcodes?.ToList(), formulas?.ToList()); + } + + /// Initializes a new instance of DocumentSpan. + /// Zero-based index of the content represented by the span. + /// Number of characters in the content represented by the span. + /// A new instance for mocking. + public static DocumentSpan DocumentSpan(int offset = default, int length = default) + { + return new DocumentSpan(offset, length); + } + + /// Initializes a new instance of DocumentWord. + /// Text content of the word. + /// + /// Bounding polygon of the word, with coordinates specified relative to the + /// top-left of the page. The numbers represent the x, y values of the polygon + /// vertices, clockwise from the left (-180 degrees inclusive) relative to the + /// element orientation. + /// + /// Location of the word in the reading order concatenated content. + /// Confidence of correctly extracting the word. + /// A new instance for mocking. + public static DocumentWord DocumentWord(string content = null, IEnumerable polygon = null, DocumentSpan span = null, float confidence = default) + { + polygon ??= new List(); + + return new DocumentWord(content, polygon?.ToList(), span, confidence); + } + + /// Initializes a new instance of DocumentSelectionMark. + /// State of the selection mark. + /// + /// Bounding polygon of the selection mark, with coordinates specified relative + /// to the top-left of the page. The numbers represent the x, y values of the + /// polygon vertices, clockwise from the left (-180 degrees inclusive) relative + /// to the element orientation. + /// + /// Location of the selection mark in the reading order concatenated content. + /// Confidence of correctly extracting the selection mark. + /// A new instance for mocking. + public static DocumentSelectionMark DocumentSelectionMark(DocumentSelectionMarkState state = default, IEnumerable polygon = null, DocumentSpan span = null, float confidence = default) + { + polygon ??= new List(); + + return new DocumentSelectionMark(state, polygon?.ToList(), span, confidence); + } + + /// Initializes a new instance of DocumentLine. + /// Concatenated content of the contained elements in reading order. + /// + /// Bounding polygon of the line, with coordinates specified relative to the + /// top-left of the page. The numbers represent the x, y values of the polygon + /// vertices, clockwise from the left (-180 degrees inclusive) relative to the + /// element orientation. + /// + /// Location of the line in the reading order concatenated content. + /// A new instance for mocking. + public static DocumentLine DocumentLine(string content = null, IEnumerable polygon = null, IEnumerable spans = null) + { + polygon ??= new List(); + spans ??= new List(); + + return new DocumentLine(content, polygon?.ToList(), spans?.ToList()); + } + + /// Initializes a new instance of DocumentBarcode. + /// Barcode kind. + /// Barcode value. + /// + /// Bounding polygon of the barcode, with coordinates specified relative to the + /// top-left of the page. The numbers represent the x, y values of the polygon + /// vertices, clockwise from the left (-180 degrees inclusive) relative to the + /// element orientation. + /// + /// Location of the barcode in the reading order concatenated content. + /// Confidence of correctly extracting the barcode. + /// A new instance for mocking. + public static DocumentBarcode DocumentBarcode(DocumentBarcodeKind kind = default, string value = null, IEnumerable polygon = null, DocumentSpan span = null, float confidence = default) + { + polygon ??= new List(); + + return new DocumentBarcode(kind, value, polygon?.ToList(), span, confidence); + } + + /// Initializes a new instance of DocumentFormula. + /// Formula kind. + /// LaTex expression describing the formula. + /// + /// Bounding polygon of the formula, with coordinates specified relative to the + /// top-left of the page. The numbers represent the x, y values of the polygon + /// vertices, clockwise from the left (-180 degrees inclusive) relative to the + /// element orientation. + /// + /// Location of the formula in the reading order concatenated content. + /// Confidence of correctly extracting the formula. + /// A new instance for mocking. + public static DocumentFormula DocumentFormula(DocumentFormulaKind kind = default, string value = null, IEnumerable polygon = null, DocumentSpan span = null, float confidence = default) + { + polygon ??= new List(); + + return new DocumentFormula(kind, value, polygon?.ToList(), span, confidence); + } + + /// Initializes a new instance of DocumentParagraph. + /// Semantic role of the paragraph. + /// Concatenated content of the paragraph in reading order. + /// Bounding regions covering the paragraph. + /// Location of the paragraph in the reading order concatenated content. + /// A new instance for mocking. + public static DocumentParagraph DocumentParagraph(ParagraphRole? role = null, string content = null, IEnumerable boundingRegions = null, IEnumerable spans = null) + { + boundingRegions ??= new List(); + spans ??= new List(); + + return new DocumentParagraph(role, content, boundingRegions?.ToList(), spans?.ToList()); + } + + /// Initializes a new instance of BoundingRegion. + /// 1-based page number of page containing the bounding region. + /// + /// Bounding polygon on the page, or the entire page if not specified. + /// Coordinates specified relative to the top-left of the page. The numbers + /// represent the x, y values of the polygon vertices, clockwise from the left + /// (-180 degrees inclusive) relative to the element orientation. + /// + /// A new instance for mocking. + public static BoundingRegion BoundingRegion(int pageNumber = default, IEnumerable polygon = null) + { + polygon ??= new List(); + + return new BoundingRegion(pageNumber, polygon?.ToList()); + } + + /// Initializes a new instance of DocumentTable. + /// Number of rows in the table. + /// Number of columns in the table. + /// Cells contained within the table. + /// Bounding regions covering the table. + /// Location of the table in the reading order concatenated content. + /// Caption associated with the table. + /// List of footnotes associated with the table. + /// A new instance for mocking. + public static DocumentTable DocumentTable(int rowCount = default, int columnCount = default, IEnumerable cells = null, IEnumerable boundingRegions = null, IEnumerable spans = null, DocumentCaption caption = null, IEnumerable footnotes = null) + { + cells ??= new List(); + boundingRegions ??= new List(); + spans ??= new List(); + footnotes ??= new List(); + + return new DocumentTable(rowCount, columnCount, cells?.ToList(), boundingRegions?.ToList(), spans?.ToList(), caption, footnotes?.ToList()); + } + + /// Initializes a new instance of DocumentTableCell. + /// Table cell kind. + /// Row index of the cell. + /// Column index of the cell. + /// Number of rows spanned by this cell. + /// Number of columns spanned by this cell. + /// Concatenated content of the table cell in reading order. + /// Bounding regions covering the table cell. + /// Location of the table cell in the reading order concatenated content. + /// Child elements of the table cell. + /// A new instance for mocking. + public static DocumentTableCell DocumentTableCell(DocumentTableCellKind? kind = null, int rowIndex = default, int columnIndex = default, int? rowSpan = null, int? columnSpan = null, string content = null, IEnumerable boundingRegions = null, IEnumerable spans = null, IEnumerable elements = null) + { + boundingRegions ??= new List(); + spans ??= new List(); + elements ??= new List(); + + return new DocumentTableCell(kind, rowIndex, columnIndex, rowSpan, columnSpan, content, boundingRegions?.ToList(), spans?.ToList(), elements?.ToList()); + } + + /// Initializes a new instance of DocumentCaption. + /// Content of the caption. + /// Bounding regions covering the caption. + /// Location of the caption in the reading order concatenated content. + /// Child elements of the caption. + /// A new instance for mocking. + public static DocumentCaption DocumentCaption(string content = null, IEnumerable boundingRegions = null, IEnumerable spans = null, IEnumerable elements = null) + { + boundingRegions ??= new List(); + spans ??= new List(); + elements ??= new List(); + + return new DocumentCaption(content, boundingRegions?.ToList(), spans?.ToList(), elements?.ToList()); + } + + /// Initializes a new instance of DocumentFootnote. + /// Content of the footnote. + /// Bounding regions covering the footnote. + /// Location of the footnote in the reading order concatenated content. + /// Child elements of the footnote. + /// A new instance for mocking. + public static DocumentFootnote DocumentFootnote(string content = null, IEnumerable boundingRegions = null, IEnumerable spans = null, IEnumerable elements = null) + { + boundingRegions ??= new List(); + spans ??= new List(); + elements ??= new List(); + + return new DocumentFootnote(content, boundingRegions?.ToList(), spans?.ToList(), elements?.ToList()); + } + + /// Initializes a new instance of DocumentFigure. + /// Bounding regions covering the figure. + /// Location of the figure in the reading order concatenated content. + /// Child elements of the figure, excluding any caption or footnotes. + /// Caption associated with the figure. + /// List of footnotes associated with the figure. + /// A new instance for mocking. + public static DocumentFigure DocumentFigure(IEnumerable boundingRegions = null, IEnumerable spans = null, IEnumerable elements = null, DocumentCaption caption = null, IEnumerable footnotes = null) + { + boundingRegions ??= new List(); + spans ??= new List(); + elements ??= new List(); + footnotes ??= new List(); + + return new DocumentFigure(boundingRegions?.ToList(), spans?.ToList(), elements?.ToList(), caption, footnotes?.ToList()); + } + + /// Initializes a new instance of DocumentList. + /// Location of the list in the reading order concatenated content. + /// Items in the list. + /// A new instance for mocking. + public static DocumentList DocumentList(IEnumerable spans = null, IEnumerable items = null) + { + spans ??= new List(); + items ??= new List(); + + return new DocumentList(spans?.ToList(), items?.ToList()); + } + + /// Initializes a new instance of DocumentListItem. + /// Level of the list item (1-indexed). + /// Content of the list item. + /// Bounding regions covering the list item. + /// Location of the list item in the reading order concatenated content. + /// Child elements of the list item. + /// A new instance for mocking. + public static DocumentListItem DocumentListItem(int level = default, string content = null, IEnumerable boundingRegions = null, IEnumerable spans = null, IEnumerable elements = null) + { + boundingRegions ??= new List(); + spans ??= new List(); + elements ??= new List(); + + return new DocumentListItem(level, content, boundingRegions?.ToList(), spans?.ToList(), elements?.ToList()); + } + + /// Initializes a new instance of DocumentSection. + /// Location of the section in the reading order concatenated content. + /// Child elements of the section. + /// A new instance for mocking. + public static DocumentSection DocumentSection(IEnumerable spans = null, IEnumerable elements = null) + { + spans ??= new List(); + elements ??= new List(); + + return new DocumentSection(spans?.ToList(), elements?.ToList()); + } + + /// Initializes a new instance of DocumentKeyValuePair. + /// Field label of the key-value pair. + /// Field value of the key-value pair. + /// Confidence of correctly extracting the key-value pair. + /// A new instance for mocking. + public static DocumentKeyValuePair DocumentKeyValuePair(DocumentKeyValueElement key = null, DocumentKeyValueElement value = null, float confidence = default) + { + return new DocumentKeyValuePair(key, value, confidence); + } + + /// Initializes a new instance of DocumentKeyValueElement. + /// Concatenated content of the key-value element in reading order. + /// Bounding regions covering the key-value element. + /// Location of the key-value element in the reading order concatenated content. + /// A new instance for mocking. + public static DocumentKeyValueElement DocumentKeyValueElement(string content = null, IEnumerable boundingRegions = null, IEnumerable spans = null) + { + boundingRegions ??= new List(); + spans ??= new List(); + + return new DocumentKeyValueElement(content, boundingRegions?.ToList(), spans?.ToList()); + } + + /// Initializes a new instance of DocumentStyle. + /// Is content handwritten?. + /// + /// Visually most similar font from among the set of supported font families, with + /// fallback fonts following CSS convention (ex. 'Arial, sans-serif'). + /// + /// Font style. + /// Font weight. + /// Foreground color in #rrggbb hexadecimal format. + /// Background color in #rrggbb hexadecimal format.. + /// Location of the text elements in the concatenated content the style applies to. + /// Confidence of correctly identifying the style. + /// A new instance for mocking. + public static DocumentStyle DocumentStyle(bool? isHandwritten = null, string similarFontFamily = null, FontStyle? fontStyle = null, FontWeight? fontWeight = null, string color = null, string backgroundColor = null, IEnumerable spans = null, float confidence = default) + { + spans ??= new List(); + + return new DocumentStyle(isHandwritten, similarFontFamily, fontStyle, fontWeight, color, backgroundColor, spans?.ToList(), confidence); + } + + /// Initializes a new instance of DocumentLanguage. + /// + /// Detected language. Value may an ISO 639-1 language code (ex. "en", "fr") + /// or BCP 47 language tag (ex. "zh-Hans"). + /// + /// + /// Location of the text elements in the concatenated content the language applies + /// to. + /// + /// Confidence of correctly identifying the language. + /// A new instance for mocking. + public static DocumentLanguage DocumentLanguage(string locale = null, IEnumerable spans = null, float confidence = default) + { + spans ??= new List(); + + return new DocumentLanguage(locale, spans?.ToList(), confidence); + } + + /// Initializes a new instance of AnalyzedDocument. + /// Document type. + /// Bounding regions covering the document. + /// Location of the document in the reading order concatenated content. + /// Dictionary of named field values. + /// Confidence of correctly extracting the document. + /// A new instance for mocking. + public static AnalyzedDocument AnalyzedDocument(string docType = null, IEnumerable boundingRegions = null, IEnumerable spans = null, IReadOnlyDictionary fields = null, float confidence = default) + { + boundingRegions ??= new List(); + spans ??= new List(); + fields ??= new Dictionary(); + + return new AnalyzedDocument(docType, boundingRegions?.ToList(), spans?.ToList(), fields, confidence); + } + + /// Initializes a new instance of DocumentField. + /// Data type of the field value. + /// String value. + /// Date value in YYYY-MM-DD format (ISO 8601). + /// Time value in hh:mm:ss format (ISO 8601). + /// Phone number value in E.164 format (ex. +19876543210). + /// Floating point value. + /// Integer value. + /// Selection mark value. + /// Presence of signature. + /// 3-letter country code value (ISO 3166-1 alpha-3). + /// Array of field values. + /// Dictionary of named field values. + /// Currency value. + /// Address value. + /// Boolean value. + /// Field content. + /// Bounding regions covering the field. + /// Location of the field in the reading order concatenated content. + /// Confidence of correctly extracting the field. + /// A new instance for mocking. + public static DocumentField DocumentField(DocumentFieldType type = default, string valueString = null, DateTimeOffset? valueDate = null, TimeSpan? valueTime = null, string valuePhoneNumber = null, double? valueNumber = null, long? valueInteger = null, DocumentSelectionMarkState? valueSelectionMark = null, DocumentSignatureType? valueSignature = null, string valueCountryRegion = null, IEnumerable valueArray = null, IReadOnlyDictionary valueObject = null, CurrencyValue valueCurrency = null, AddressValue valueAddress = null, bool? valueBoolean = null, string content = null, IEnumerable boundingRegions = null, IEnumerable spans = null, float? confidence = null) + { + valueArray ??= new List(); + valueObject ??= new Dictionary(); + boundingRegions ??= new List(); + spans ??= new List(); + + return new DocumentField(type, valueString, valueDate, valueTime, valuePhoneNumber, valueNumber, valueInteger, valueSelectionMark, valueSignature, valueCountryRegion, valueArray?.ToList(), valueObject, valueCurrency, valueAddress, valueBoolean, content, boundingRegions?.ToList(), spans?.ToList(), confidence); + } + + /// Initializes a new instance of CurrencyValue. + /// Currency amount. + /// Currency symbol label, if any. + /// Resolved currency code (ISO 4217), if any. + /// A new instance for mocking. + public static CurrencyValue CurrencyValue(double amount = default, string currencySymbol = null, string currencyCode = null) + { + return new CurrencyValue(amount, currencySymbol, currencyCode); + } + + /// Initializes a new instance of AddressValue. + /// House or building number. + /// Post office box number. + /// Street name. + /// Name of city, town, village, etc. + /// First-level administrative division. + /// Postal code used for mail sorting. + /// Country/region. + /// Street-level address, excluding city, state, countryRegion, and postalCode. + /// Apartment or office number. + /// + /// Districts or boroughs within a city, such as Brooklyn in New York City or City + /// of Westminster in London. + /// + /// Second-level administrative division used in certain locales. + /// Unofficial neighborhood name, like Chinatown. + /// Build name, such as World Trade Center. + /// Floor number, such as 3F. + /// A new instance for mocking. + public static AddressValue AddressValue(string houseNumber = null, string poBox = null, string road = null, string city = null, string state = null, string postalCode = null, string countryRegion = null, string streetAddress = null, string unit = null, string cityDistrict = null, string stateDistrict = null, string suburb = null, string house = null, string level = null) + { + return new AddressValue(houseNumber, poBox, road, city, state, postalCode, countryRegion, streetAddress, unit, cityDistrict, stateDistrict, suburb, house, level); + } + /// Initializes a new instance of DocumentModelSummary. /// Unique document model name. /// Document model description. diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AddressValue.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AddressValue.Serialization.cs new file mode 100644 index 000000000000..447bc6e75646 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AddressValue.Serialization.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class AddressValue + { + internal static AddressValue DeserializeAddressValue(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional houseNumber = default; + Optional poBox = default; + Optional road = default; + Optional city = default; + Optional state = default; + Optional postalCode = default; + Optional countryRegion = default; + Optional streetAddress = default; + Optional unit = default; + Optional cityDistrict = default; + Optional stateDistrict = default; + Optional suburb = default; + Optional house = default; + Optional level = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("houseNumber"u8)) + { + houseNumber = property.Value.GetString(); + continue; + } + if (property.NameEquals("poBox"u8)) + { + poBox = property.Value.GetString(); + continue; + } + if (property.NameEquals("road"u8)) + { + road = property.Value.GetString(); + continue; + } + if (property.NameEquals("city"u8)) + { + city = property.Value.GetString(); + continue; + } + if (property.NameEquals("state"u8)) + { + state = property.Value.GetString(); + continue; + } + if (property.NameEquals("postalCode"u8)) + { + postalCode = property.Value.GetString(); + continue; + } + if (property.NameEquals("countryRegion"u8)) + { + countryRegion = property.Value.GetString(); + continue; + } + if (property.NameEquals("streetAddress"u8)) + { + streetAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("unit"u8)) + { + unit = property.Value.GetString(); + continue; + } + if (property.NameEquals("cityDistrict"u8)) + { + cityDistrict = property.Value.GetString(); + continue; + } + if (property.NameEquals("stateDistrict"u8)) + { + stateDistrict = property.Value.GetString(); + continue; + } + if (property.NameEquals("suburb"u8)) + { + suburb = property.Value.GetString(); + continue; + } + if (property.NameEquals("house"u8)) + { + house = property.Value.GetString(); + continue; + } + if (property.NameEquals("level"u8)) + { + level = property.Value.GetString(); + continue; + } + } + return new AddressValue(houseNumber.Value, poBox.Value, road.Value, city.Value, state.Value, postalCode.Value, countryRegion.Value, streetAddress.Value, unit.Value, cityDistrict.Value, stateDistrict.Value, suburb.Value, house.Value, level.Value); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AddressValue FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAddressValue(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AnalyzeResult.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AnalyzeResult.Serialization.cs new file mode 100644 index 000000000000..920bc0ade2df --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AnalyzeResult.Serialization.cs @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class AnalyzeResult + { + internal static AnalyzeResult DeserializeAnalyzeResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string apiVersion = default; + string modelId = default; + StringIndexType stringIndexType = default; + Optional contentFormat = default; + string content = default; + IReadOnlyList pages = default; + Optional> paragraphs = default; + Optional> tables = default; + Optional> figures = default; + Optional> lists = default; + Optional> sections = default; + Optional> keyValuePairs = default; + Optional> styles = default; + Optional> languages = default; + Optional> documents = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("modelId"u8)) + { + modelId = property.Value.GetString(); + continue; + } + if (property.NameEquals("stringIndexType"u8)) + { + stringIndexType = new StringIndexType(property.Value.GetString()); + continue; + } + if (property.NameEquals("contentFormat"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + contentFormat = new ContentFormat(property.Value.GetString()); + continue; + } + if (property.NameEquals("content"u8)) + { + content = property.Value.GetString(); + continue; + } + if (property.NameEquals("pages"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentPage.DeserializeDocumentPage(item)); + } + pages = array; + continue; + } + if (property.NameEquals("paragraphs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentParagraph.DeserializeDocumentParagraph(item)); + } + paragraphs = array; + continue; + } + if (property.NameEquals("tables"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentTable.DeserializeDocumentTable(item)); + } + tables = array; + continue; + } + if (property.NameEquals("figures"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentFigure.DeserializeDocumentFigure(item)); + } + figures = array; + continue; + } + if (property.NameEquals("lists"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentList.DeserializeDocumentList(item)); + } + lists = array; + continue; + } + if (property.NameEquals("sections"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentSection.DeserializeDocumentSection(item)); + } + sections = array; + continue; + } + if (property.NameEquals("keyValuePairs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentKeyValuePair.DeserializeDocumentKeyValuePair(item)); + } + keyValuePairs = array; + continue; + } + if (property.NameEquals("styles"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentStyle.DeserializeDocumentStyle(item)); + } + styles = array; + continue; + } + if (property.NameEquals("languages"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentLanguage.DeserializeDocumentLanguage(item)); + } + languages = array; + continue; + } + if (property.NameEquals("documents"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AnalyzedDocument.DeserializeAnalyzedDocument(item)); + } + documents = array; + continue; + } + } + return new AnalyzeResult(apiVersion, modelId, stringIndexType, Optional.ToNullable(contentFormat), content, pages, Optional.ToList(paragraphs), Optional.ToList(tables), Optional.ToList(figures), Optional.ToList(lists), Optional.ToList(sections), Optional.ToList(keyValuePairs), Optional.ToList(styles), Optional.ToList(languages), Optional.ToList(documents)); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AnalyzedDocument.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AnalyzedDocument.Serialization.cs new file mode 100644 index 000000000000..5c002a19a6c7 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AnalyzedDocument.Serialization.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class AnalyzedDocument + { + internal static AnalyzedDocument DeserializeAnalyzedDocument(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string docType = default; + Optional> boundingRegions = default; + IReadOnlyList spans = default; + Optional> fields = default; + float confidence = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("docType"u8)) + { + docType = property.Value.GetString(); + continue; + } + if (property.NameEquals("boundingRegions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BoundingRegion.DeserializeBoundingRegion(item)); + } + boundingRegions = array; + continue; + } + if (property.NameEquals("spans"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentSpan.DeserializeDocumentSpan(item)); + } + spans = array; + continue; + } + if (property.NameEquals("fields"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, DocumentField.DeserializeDocumentField(property0.Value)); + } + fields = dictionary; + continue; + } + if (property.NameEquals("confidence"u8)) + { + confidence = property.Value.GetSingle(); + continue; + } + } + return new AnalyzedDocument(docType, Optional.ToList(boundingRegions), spans, Optional.ToDictionary(fields), confidence); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AnalyzedDocument FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAnalyzedDocument(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/BoundingRegion.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/BoundingRegion.Serialization.cs new file mode 100644 index 000000000000..8a14d1290280 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/BoundingRegion.Serialization.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class BoundingRegion + { + internal static BoundingRegion DeserializeBoundingRegion(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int pageNumber = default; + IReadOnlyList polygon = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("pageNumber"u8)) + { + pageNumber = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("polygon"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetSingle()); + } + polygon = array; + continue; + } + } + return new BoundingRegion(pageNumber, polygon); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BoundingRegion FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBoundingRegion(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/CurrencyValue.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/CurrencyValue.Serialization.cs new file mode 100644 index 000000000000..d0e0852370c4 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/CurrencyValue.Serialization.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class CurrencyValue + { + internal static CurrencyValue DeserializeCurrencyValue(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + double amount = default; + Optional currencySymbol = default; + Optional currencyCode = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("amount"u8)) + { + amount = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("currencySymbol"u8)) + { + currencySymbol = property.Value.GetString(); + continue; + } + if (property.NameEquals("currencyCode"u8)) + { + currencyCode = property.Value.GetString(); + continue; + } + } + return new CurrencyValue(amount, currencySymbol.Value, currencyCode.Value); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static CurrencyValue FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCurrencyValue(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentBarcode.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentBarcode.Serialization.cs new file mode 100644 index 000000000000..e5cdd935d6a3 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentBarcode.Serialization.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentBarcode + { + internal static DocumentBarcode DeserializeDocumentBarcode(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DocumentBarcodeKind kind = default; + string value = default; + Optional> polygon = default; + DocumentSpan span = default; + float confidence = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + kind = new DocumentBarcodeKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (property.NameEquals("polygon"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetSingle()); + } + polygon = array; + continue; + } + if (property.NameEquals("span"u8)) + { + span = DocumentSpan.DeserializeDocumentSpan(property.Value); + continue; + } + if (property.NameEquals("confidence"u8)) + { + confidence = property.Value.GetSingle(); + continue; + } + } + return new DocumentBarcode(kind, value, Optional.ToList(polygon), span, confidence); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentBarcode FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentBarcode(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentBarcode.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentBarcode.cs index f394ab79a44e..280be43975e1 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentBarcode.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentBarcode.cs @@ -19,10 +19,9 @@ public partial class DocumentBarcode /// Barcode value. /// Location of the barcode in the reading order concatenated content. /// Confidence of correctly extracting the barcode. - /// , or is null. - internal DocumentBarcode(string kind, string value, DocumentSpan span, float confidence) + /// or is null. + internal DocumentBarcode(DocumentBarcodeKind kind, string value, DocumentSpan span, float confidence) { - Argument.AssertNotNull(kind, nameof(kind)); Argument.AssertNotNull(value, nameof(value)); Argument.AssertNotNull(span, nameof(span)); @@ -44,7 +43,7 @@ internal DocumentBarcode(string kind, string value, DocumentSpan span, float con /// /// Location of the barcode in the reading order concatenated content. /// Confidence of correctly extracting the barcode. - internal DocumentBarcode(string kind, string value, IReadOnlyList polygon, DocumentSpan span, float confidence) + internal DocumentBarcode(DocumentBarcodeKind kind, string value, IReadOnlyList polygon, DocumentSpan span, float confidence) { Kind = kind; Value = value; @@ -54,7 +53,7 @@ internal DocumentBarcode(string kind, string value, IReadOnlyList polygon } /// Barcode kind. - public string Kind { get; } + public DocumentBarcodeKind Kind { get; } /// Barcode value. public string Value { get; } /// diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentBarcodeKind.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentBarcodeKind.cs new file mode 100644 index 000000000000..d3a6308fe9ed --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentBarcodeKind.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.DocumentIntelligence +{ + /// Barcode kind. + public readonly partial struct DocumentBarcodeKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DocumentBarcodeKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string QRCodeValue = "QRCode"; + private const string PDF417Value = "PDF417"; + private const string UPCAValue = "UPCA"; + private const string UPCEValue = "UPCE"; + private const string Code39Value = "Code39"; + private const string Code128Value = "Code128"; + private const string EAN8Value = "EAN8"; + private const string EAN13Value = "EAN13"; + private const string DataBarValue = "DataBar"; + private const string Code93Value = "Code93"; + private const string CodabarValue = "Codabar"; + private const string DataBarExpandedValue = "DataBarExpanded"; + private const string ITFValue = "ITF"; + private const string MicroQRCodeValue = "MicroQRCode"; + private const string AztecValue = "Aztec"; + private const string DataMatrixValue = "DataMatrix"; + private const string MaxiCodeValue = "MaxiCode"; + + /// QR code, as defined in ISO/IEC 18004:2015. + public static DocumentBarcodeKind QRCode { get; } = new DocumentBarcodeKind(QRCodeValue); + /// PDF417, as defined in ISO 15438. + public static DocumentBarcodeKind PDF417 { get; } = new DocumentBarcodeKind(PDF417Value); + /// GS1 12-digit Universal Product Code. + public static DocumentBarcodeKind UPCA { get; } = new DocumentBarcodeKind(UPCAValue); + /// GS1 6-digit Universal Product Code. + public static DocumentBarcodeKind UPCE { get; } = new DocumentBarcodeKind(UPCEValue); + /// Code 39 barcode, as defined in ISO/IEC 16388:2007. + public static DocumentBarcodeKind Code39 { get; } = new DocumentBarcodeKind(Code39Value); + /// Code 128 barcode, as defined in ISO/IEC 15417:2007. + public static DocumentBarcodeKind Code128 { get; } = new DocumentBarcodeKind(Code128Value); + /// GS1 8-digit International Article Number (European Article Number). + public static DocumentBarcodeKind EAN8 { get; } = new DocumentBarcodeKind(EAN8Value); + /// GS1 13-digit International Article Number (European Article Number). + public static DocumentBarcodeKind EAN13 { get; } = new DocumentBarcodeKind(EAN13Value); + /// GS1 DataBar barcode. + public static DocumentBarcodeKind DataBar { get; } = new DocumentBarcodeKind(DataBarValue); + /// Code 93 barcode, as defined in ANSI/AIM BC5-1995. + public static DocumentBarcodeKind Code93 { get; } = new DocumentBarcodeKind(Code93Value); + /// Codabar barcode, as defined in ANSI/AIM BC3-1995. + public static DocumentBarcodeKind Codabar { get; } = new DocumentBarcodeKind(CodabarValue); + /// GS1 DataBar Expanded barcode. + public static DocumentBarcodeKind DataBarExpanded { get; } = new DocumentBarcodeKind(DataBarExpandedValue); + /// Interleaved 2 of 5 barcode, as defined in ANSI/AIM BC2-1995. + public static DocumentBarcodeKind ITF { get; } = new DocumentBarcodeKind(ITFValue); + /// Micro QR code, as defined in ISO/IEC 23941:2022. + public static DocumentBarcodeKind MicroQRCode { get; } = new DocumentBarcodeKind(MicroQRCodeValue); + /// Aztec code, as defined in ISO/IEC 24778:2008. + public static DocumentBarcodeKind Aztec { get; } = new DocumentBarcodeKind(AztecValue); + /// Data matrix code, as defined in ISO/IEC 16022:2006. + public static DocumentBarcodeKind DataMatrix { get; } = new DocumentBarcodeKind(DataMatrixValue); + /// MaxiCode, as defined in ISO/IEC 16023:2000. + public static DocumentBarcodeKind MaxiCode { get; } = new DocumentBarcodeKind(MaxiCodeValue); + /// Determines if two values are the same. + public static bool operator ==(DocumentBarcodeKind left, DocumentBarcodeKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DocumentBarcodeKind left, DocumentBarcodeKind right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DocumentBarcodeKind(string value) => new DocumentBarcodeKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DocumentBarcodeKind other && Equals(other); + /// + public bool Equals(DocumentBarcodeKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentCaption.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentCaption.Serialization.cs new file mode 100644 index 000000000000..5960afa82cee --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentCaption.Serialization.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentCaption + { + internal static DocumentCaption DeserializeDocumentCaption(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string content = default; + Optional> boundingRegions = default; + IReadOnlyList spans = default; + Optional> elements = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("content"u8)) + { + content = property.Value.GetString(); + continue; + } + if (property.NameEquals("boundingRegions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BoundingRegion.DeserializeBoundingRegion(item)); + } + boundingRegions = array; + continue; + } + if (property.NameEquals("spans"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentSpan.DeserializeDocumentSpan(item)); + } + spans = array; + continue; + } + if (property.NameEquals("elements"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + elements = array; + continue; + } + } + return new DocumentCaption(content, Optional.ToList(boundingRegions), spans, Optional.ToList(elements)); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentCaption FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentCaption(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentField.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentField.Serialization.cs new file mode 100644 index 000000000000..07d66a393653 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentField.Serialization.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentField + { + internal static DocumentField DeserializeDocumentField(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DocumentFieldType type = default; + Optional valueString = default; + Optional valueDate = default; + Optional valueTime = default; + Optional valuePhoneNumber = default; + Optional valueNumber = default; + Optional valueInteger = default; + Optional valueSelectionMark = default; + Optional valueSignature = default; + Optional valueCountryRegion = default; + Optional> valueArray = default; + Optional> valueObject = default; + Optional valueCurrency = default; + Optional valueAddress = default; + Optional valueBoolean = default; + Optional content = default; + Optional> boundingRegions = default; + Optional> spans = default; + Optional confidence = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = new DocumentFieldType(property.Value.GetString()); + continue; + } + if (property.NameEquals("valueString"u8)) + { + valueString = property.Value.GetString(); + continue; + } + if (property.NameEquals("valueDate"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + valueDate = property.Value.GetDateTimeOffset("D"); + continue; + } + if (property.NameEquals("valueTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + valueTime = property.Value.GetTimeSpan("T"); + continue; + } + if (property.NameEquals("valuePhoneNumber"u8)) + { + valuePhoneNumber = property.Value.GetString(); + continue; + } + if (property.NameEquals("valueNumber"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + valueNumber = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("valueInteger"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + valueInteger = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("valueSelectionMark"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + valueSelectionMark = new DocumentSelectionMarkState(property.Value.GetString()); + continue; + } + if (property.NameEquals("valueSignature"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + valueSignature = new DocumentSignatureType(property.Value.GetString()); + continue; + } + if (property.NameEquals("valueCountryRegion"u8)) + { + valueCountryRegion = property.Value.GetString(); + continue; + } + if (property.NameEquals("valueArray"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeserializeDocumentField(item)); + } + valueArray = array; + continue; + } + if (property.NameEquals("valueObject"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, DeserializeDocumentField(property0.Value)); + } + valueObject = dictionary; + continue; + } + if (property.NameEquals("valueCurrency"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + valueCurrency = CurrencyValue.DeserializeCurrencyValue(property.Value); + continue; + } + if (property.NameEquals("valueAddress"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + valueAddress = AddressValue.DeserializeAddressValue(property.Value); + continue; + } + if (property.NameEquals("valueBoolean"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + valueBoolean = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("content"u8)) + { + content = property.Value.GetString(); + continue; + } + if (property.NameEquals("boundingRegions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BoundingRegion.DeserializeBoundingRegion(item)); + } + boundingRegions = array; + continue; + } + if (property.NameEquals("spans"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentSpan.DeserializeDocumentSpan(item)); + } + spans = array; + continue; + } + if (property.NameEquals("confidence"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + confidence = property.Value.GetSingle(); + continue; + } + } + return new DocumentField(type, valueString.Value, Optional.ToNullable(valueDate), Optional.ToNullable(valueTime), valuePhoneNumber.Value, Optional.ToNullable(valueNumber), Optional.ToNullable(valueInteger), Optional.ToNullable(valueSelectionMark), Optional.ToNullable(valueSignature), valueCountryRegion.Value, Optional.ToList(valueArray), Optional.ToDictionary(valueObject), valueCurrency.Value, valueAddress.Value, Optional.ToNullable(valueBoolean), content.Value, Optional.ToList(boundingRegions), Optional.ToList(spans), Optional.ToNullable(confidence)); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentField FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentField(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentField.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentField.cs index be277e7a26d3..b8ed03f8a698 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentField.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentField.cs @@ -45,7 +45,7 @@ internal DocumentField(DocumentFieldType type) /// Bounding regions covering the field. /// Location of the field in the reading order concatenated content. /// Confidence of correctly extracting the field. - internal DocumentField(DocumentFieldType type, string valueString, DateTimeOffset? valueDate, TimeSpan? valueTime, string valuePhoneNumber, double? valueNumber, long? valueInteger, string valueSelectionMark, string valueSignature, string valueCountryRegion, IReadOnlyList valueArray, IReadOnlyDictionary valueObject, CurrencyValue valueCurrency, AddressValue valueAddress, bool? valueBoolean, string content, IReadOnlyList boundingRegions, IReadOnlyList spans, float? confidence) + internal DocumentField(DocumentFieldType type, string valueString, DateTimeOffset? valueDate, TimeSpan? valueTime, string valuePhoneNumber, double? valueNumber, long? valueInteger, DocumentSelectionMarkState? valueSelectionMark, DocumentSignatureType? valueSignature, string valueCountryRegion, IReadOnlyList valueArray, IReadOnlyDictionary valueObject, CurrencyValue valueCurrency, AddressValue valueAddress, bool? valueBoolean, string content, IReadOnlyList boundingRegions, IReadOnlyList spans, float? confidence) { Type = type; ValueString = valueString; @@ -83,9 +83,9 @@ internal DocumentField(DocumentFieldType type, string valueString, DateTimeOffse /// Integer value. public long? ValueInteger { get; } /// Selection mark value. - public string ValueSelectionMark { get; } + public DocumentSelectionMarkState? ValueSelectionMark { get; } /// Presence of signature. - public string ValueSignature { get; } + public DocumentSignatureType? ValueSignature { get; } /// 3-letter country code value (ISO 3166-1 alpha-3). public string ValueCountryRegion { get; } /// Array of field values. diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFigure.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFigure.Serialization.cs new file mode 100644 index 000000000000..fafa8207b23c --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFigure.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentFigure + { + internal static DocumentFigure DeserializeDocumentFigure(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> boundingRegions = default; + IReadOnlyList spans = default; + Optional> elements = default; + Optional caption = default; + Optional> footnotes = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("boundingRegions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BoundingRegion.DeserializeBoundingRegion(item)); + } + boundingRegions = array; + continue; + } + if (property.NameEquals("spans"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentSpan.DeserializeDocumentSpan(item)); + } + spans = array; + continue; + } + if (property.NameEquals("elements"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + elements = array; + continue; + } + if (property.NameEquals("caption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + caption = DocumentCaption.DeserializeDocumentCaption(property.Value); + continue; + } + if (property.NameEquals("footnotes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentFootnote.DeserializeDocumentFootnote(item)); + } + footnotes = array; + continue; + } + } + return new DocumentFigure(Optional.ToList(boundingRegions), spans, Optional.ToList(elements), caption.Value, Optional.ToList(footnotes)); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentFigure FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentFigure(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFootnote.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFootnote.Serialization.cs new file mode 100644 index 000000000000..4267184bc617 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFootnote.Serialization.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentFootnote + { + internal static DocumentFootnote DeserializeDocumentFootnote(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string content = default; + Optional> boundingRegions = default; + IReadOnlyList spans = default; + Optional> elements = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("content"u8)) + { + content = property.Value.GetString(); + continue; + } + if (property.NameEquals("boundingRegions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BoundingRegion.DeserializeBoundingRegion(item)); + } + boundingRegions = array; + continue; + } + if (property.NameEquals("spans"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentSpan.DeserializeDocumentSpan(item)); + } + spans = array; + continue; + } + if (property.NameEquals("elements"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + elements = array; + continue; + } + } + return new DocumentFootnote(content, Optional.ToList(boundingRegions), spans, Optional.ToList(elements)); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentFootnote FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentFootnote(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFormula.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFormula.Serialization.cs new file mode 100644 index 000000000000..59924587019a --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFormula.Serialization.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentFormula + { + internal static DocumentFormula DeserializeDocumentFormula(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DocumentFormulaKind kind = default; + string value = default; + Optional> polygon = default; + DocumentSpan span = default; + float confidence = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + kind = new DocumentFormulaKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (property.NameEquals("polygon"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetSingle()); + } + polygon = array; + continue; + } + if (property.NameEquals("span"u8)) + { + span = DocumentSpan.DeserializeDocumentSpan(property.Value); + continue; + } + if (property.NameEquals("confidence"u8)) + { + confidence = property.Value.GetSingle(); + continue; + } + } + return new DocumentFormula(kind, value, Optional.ToList(polygon), span, confidence); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentFormula FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentFormula(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFormula.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFormula.cs index 17351879d7e9..66ef4f71a3af 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFormula.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFormula.cs @@ -19,10 +19,9 @@ public partial class DocumentFormula /// LaTex expression describing the formula. /// Location of the formula in the reading order concatenated content. /// Confidence of correctly extracting the formula. - /// , or is null. - internal DocumentFormula(string kind, string value, DocumentSpan span, float confidence) + /// or is null. + internal DocumentFormula(DocumentFormulaKind kind, string value, DocumentSpan span, float confidence) { - Argument.AssertNotNull(kind, nameof(kind)); Argument.AssertNotNull(value, nameof(value)); Argument.AssertNotNull(span, nameof(span)); @@ -44,7 +43,7 @@ internal DocumentFormula(string kind, string value, DocumentSpan span, float con /// /// Location of the formula in the reading order concatenated content. /// Confidence of correctly extracting the formula. - internal DocumentFormula(string kind, string value, IReadOnlyList polygon, DocumentSpan span, float confidence) + internal DocumentFormula(DocumentFormulaKind kind, string value, IReadOnlyList polygon, DocumentSpan span, float confidence) { Kind = kind; Value = value; @@ -54,7 +53,7 @@ internal DocumentFormula(string kind, string value, IReadOnlyList polygon } /// Formula kind. - public string Kind { get; } + public DocumentFormulaKind Kind { get; } /// LaTex expression describing the formula. public string Value { get; } /// diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFormulaKind.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFormulaKind.cs new file mode 100644 index 000000000000..69c554d0e845 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFormulaKind.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.DocumentIntelligence +{ + /// Formula kind. + public readonly partial struct DocumentFormulaKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DocumentFormulaKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InlineValue = "inline"; + private const string DisplayValue = "display"; + + /// A formula embedded within the content of a paragraph. + public static DocumentFormulaKind Inline { get; } = new DocumentFormulaKind(InlineValue); + /// A formula in display mode that takes up an entire line. + public static DocumentFormulaKind Display { get; } = new DocumentFormulaKind(DisplayValue); + /// Determines if two values are the same. + public static bool operator ==(DocumentFormulaKind left, DocumentFormulaKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DocumentFormulaKind left, DocumentFormulaKind right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DocumentFormulaKind(string value) => new DocumentFormulaKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DocumentFormulaKind other && Equals(other); + /// + public bool Equals(DocumentFormulaKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentKeyValueElement.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentKeyValueElement.Serialization.cs new file mode 100644 index 000000000000..69a3d32f388c --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentKeyValueElement.Serialization.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentKeyValueElement + { + internal static DocumentKeyValueElement DeserializeDocumentKeyValueElement(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string content = default; + Optional> boundingRegions = default; + IReadOnlyList spans = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("content"u8)) + { + content = property.Value.GetString(); + continue; + } + if (property.NameEquals("boundingRegions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BoundingRegion.DeserializeBoundingRegion(item)); + } + boundingRegions = array; + continue; + } + if (property.NameEquals("spans"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentSpan.DeserializeDocumentSpan(item)); + } + spans = array; + continue; + } + } + return new DocumentKeyValueElement(content, Optional.ToList(boundingRegions), spans); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentKeyValueElement FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentKeyValueElement(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentKeyValuePair.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentKeyValuePair.Serialization.cs new file mode 100644 index 000000000000..268542fa5d02 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentKeyValuePair.Serialization.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentKeyValuePair + { + internal static DocumentKeyValuePair DeserializeDocumentKeyValuePair(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DocumentKeyValueElement key = default; + Optional value = default; + float confidence = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("key"u8)) + { + key = DocumentKeyValueElement.DeserializeDocumentKeyValueElement(property.Value); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + value = DocumentKeyValueElement.DeserializeDocumentKeyValueElement(property.Value); + continue; + } + if (property.NameEquals("confidence"u8)) + { + confidence = property.Value.GetSingle(); + continue; + } + } + return new DocumentKeyValuePair(key, value.Value, confidence); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentKeyValuePair FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentKeyValuePair(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentLanguage.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentLanguage.Serialization.cs new file mode 100644 index 000000000000..f30b10bca349 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentLanguage.Serialization.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentLanguage + { + internal static DocumentLanguage DeserializeDocumentLanguage(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string locale = default; + IReadOnlyList spans = default; + float confidence = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("locale"u8)) + { + locale = property.Value.GetString(); + continue; + } + if (property.NameEquals("spans"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentSpan.DeserializeDocumentSpan(item)); + } + spans = array; + continue; + } + if (property.NameEquals("confidence"u8)) + { + confidence = property.Value.GetSingle(); + continue; + } + } + return new DocumentLanguage(locale, spans, confidence); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentLanguage FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentLanguage(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentLine.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentLine.Serialization.cs new file mode 100644 index 000000000000..17406fde04ab --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentLine.Serialization.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentLine + { + internal static DocumentLine DeserializeDocumentLine(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string content = default; + Optional> polygon = default; + IReadOnlyList spans = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("content"u8)) + { + content = property.Value.GetString(); + continue; + } + if (property.NameEquals("polygon"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetSingle()); + } + polygon = array; + continue; + } + if (property.NameEquals("spans"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentSpan.DeserializeDocumentSpan(item)); + } + spans = array; + continue; + } + } + return new DocumentLine(content, Optional.ToList(polygon), spans); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentLine FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentLine(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentList.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentList.Serialization.cs new file mode 100644 index 000000000000..605d9b038519 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentList.Serialization.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentList + { + internal static DocumentList DeserializeDocumentList(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList spans = default; + IReadOnlyList items = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("spans"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentSpan.DeserializeDocumentSpan(item)); + } + spans = array; + continue; + } + if (property.NameEquals("items"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentListItem.DeserializeDocumentListItem(item)); + } + items = array; + continue; + } + } + return new DocumentList(spans, items); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentList FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentList(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentListItem.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentListItem.Serialization.cs new file mode 100644 index 000000000000..1c9eae7f7125 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentListItem.Serialization.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentListItem + { + internal static DocumentListItem DeserializeDocumentListItem(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int level = default; + string content = default; + Optional> boundingRegions = default; + IReadOnlyList spans = default; + Optional> elements = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("level"u8)) + { + level = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("content"u8)) + { + content = property.Value.GetString(); + continue; + } + if (property.NameEquals("boundingRegions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BoundingRegion.DeserializeBoundingRegion(item)); + } + boundingRegions = array; + continue; + } + if (property.NameEquals("spans"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentSpan.DeserializeDocumentSpan(item)); + } + spans = array; + continue; + } + if (property.NameEquals("elements"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + elements = array; + continue; + } + } + return new DocumentListItem(level, content, Optional.ToList(boundingRegions), spans, Optional.ToList(elements)); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentListItem FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentListItem(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentPage.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentPage.Serialization.cs new file mode 100644 index 000000000000..9b6bac115973 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentPage.Serialization.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentPage + { + internal static DocumentPage DeserializeDocumentPage(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int pageNumber = default; + Optional angle = default; + Optional width = default; + Optional height = default; + Optional unit = default; + IReadOnlyList spans = default; + Optional> words = default; + Optional> selectionMarks = default; + Optional> lines = default; + Optional> barcodes = default; + Optional> formulas = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("pageNumber"u8)) + { + pageNumber = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("angle"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + angle = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("width"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + width = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("height"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + height = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("unit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + unit = new LengthUnit(property.Value.GetString()); + continue; + } + if (property.NameEquals("spans"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentSpan.DeserializeDocumentSpan(item)); + } + spans = array; + continue; + } + if (property.NameEquals("words"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentWord.DeserializeDocumentWord(item)); + } + words = array; + continue; + } + if (property.NameEquals("selectionMarks"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentSelectionMark.DeserializeDocumentSelectionMark(item)); + } + selectionMarks = array; + continue; + } + if (property.NameEquals("lines"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentLine.DeserializeDocumentLine(item)); + } + lines = array; + continue; + } + if (property.NameEquals("barcodes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentBarcode.DeserializeDocumentBarcode(item)); + } + barcodes = array; + continue; + } + if (property.NameEquals("formulas"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentFormula.DeserializeDocumentFormula(item)); + } + formulas = array; + continue; + } + } + return new DocumentPage(pageNumber, Optional.ToNullable(angle), Optional.ToNullable(width), Optional.ToNullable(height), Optional.ToNullable(unit), spans, Optional.ToList(words), Optional.ToList(selectionMarks), Optional.ToList(lines), Optional.ToList(barcodes), Optional.ToList(formulas)); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentPage FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentPage(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentPage.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentPage.cs index af930b0ac8b9..7b7f7fef2906 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentPage.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentPage.cs @@ -53,7 +53,7 @@ internal DocumentPage(int pageNumber, IEnumerable spans) /// /// Extracted barcodes from the page. /// Extracted formulas from the page. - internal DocumentPage(int pageNumber, float? angle, float? width, float? height, string unit, IReadOnlyList spans, IReadOnlyList words, IReadOnlyList selectionMarks, IReadOnlyList lines, IReadOnlyList barcodes, IReadOnlyList formulas) + internal DocumentPage(int pageNumber, float? angle, float? width, float? height, LengthUnit? unit, IReadOnlyList spans, IReadOnlyList words, IReadOnlyList selectionMarks, IReadOnlyList lines, IReadOnlyList barcodes, IReadOnlyList formulas) { PageNumber = pageNumber; Angle = angle; @@ -83,7 +83,7 @@ internal DocumentPage(int pageNumber, float? angle, float? width, float? height, /// The unit used by the width, height, and polygon properties. For images, the /// unit is "pixel". For PDF, the unit is "inch". /// - public string Unit { get; } + public LengthUnit? Unit { get; } /// Location of the page in the reading order concatenated content. public IReadOnlyList Spans { get; } /// Extracted words from the page. diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentParagraph.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentParagraph.Serialization.cs new file mode 100644 index 000000000000..4fd99dc73cb6 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentParagraph.Serialization.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentParagraph + { + internal static DocumentParagraph DeserializeDocumentParagraph(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional role = default; + string content = default; + Optional> boundingRegions = default; + IReadOnlyList spans = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("role"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + role = new ParagraphRole(property.Value.GetString()); + continue; + } + if (property.NameEquals("content"u8)) + { + content = property.Value.GetString(); + continue; + } + if (property.NameEquals("boundingRegions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BoundingRegion.DeserializeBoundingRegion(item)); + } + boundingRegions = array; + continue; + } + if (property.NameEquals("spans"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentSpan.DeserializeDocumentSpan(item)); + } + spans = array; + continue; + } + } + return new DocumentParagraph(Optional.ToNullable(role), content, Optional.ToList(boundingRegions), spans); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentParagraph FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentParagraph(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentParagraph.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentParagraph.cs index d39bc709b6f1..a6cd650fd7f8 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentParagraph.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentParagraph.cs @@ -37,7 +37,7 @@ internal DocumentParagraph(string content, IEnumerable spans) /// Concatenated content of the paragraph in reading order. /// Bounding regions covering the paragraph. /// Location of the paragraph in the reading order concatenated content. - internal DocumentParagraph(string role, string content, IReadOnlyList boundingRegions, IReadOnlyList spans) + internal DocumentParagraph(ParagraphRole? role, string content, IReadOnlyList boundingRegions, IReadOnlyList spans) { Role = role; Content = content; @@ -46,7 +46,7 @@ internal DocumentParagraph(string role, string content, IReadOnlyList Semantic role of the paragraph. - public string Role { get; } + public ParagraphRole? Role { get; } /// Concatenated content of the paragraph in reading order. public string Content { get; } /// Bounding regions covering the paragraph. diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSection.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSection.Serialization.cs new file mode 100644 index 000000000000..3e472fb71b45 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSection.Serialization.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentSection + { + internal static DocumentSection DeserializeDocumentSection(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList spans = default; + Optional> elements = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("spans"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentSpan.DeserializeDocumentSpan(item)); + } + spans = array; + continue; + } + if (property.NameEquals("elements"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + elements = array; + continue; + } + } + return new DocumentSection(spans, Optional.ToList(elements)); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentSection FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentSection(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSelectionMark.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSelectionMark.Serialization.cs new file mode 100644 index 000000000000..da3954aa216c --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSelectionMark.Serialization.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentSelectionMark + { + internal static DocumentSelectionMark DeserializeDocumentSelectionMark(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DocumentSelectionMarkState state = default; + Optional> polygon = default; + DocumentSpan span = default; + float confidence = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("state"u8)) + { + state = new DocumentSelectionMarkState(property.Value.GetString()); + continue; + } + if (property.NameEquals("polygon"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetSingle()); + } + polygon = array; + continue; + } + if (property.NameEquals("span"u8)) + { + span = DocumentSpan.DeserializeDocumentSpan(property.Value); + continue; + } + if (property.NameEquals("confidence"u8)) + { + confidence = property.Value.GetSingle(); + continue; + } + } + return new DocumentSelectionMark(state, Optional.ToList(polygon), span, confidence); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentSelectionMark FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentSelectionMark(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSelectionMark.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSelectionMark.cs index a1785e7c8b69..3077ab1d17a6 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSelectionMark.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSelectionMark.cs @@ -21,10 +21,9 @@ public partial class DocumentSelectionMark /// State of the selection mark. /// Location of the selection mark in the reading order concatenated content. /// Confidence of correctly extracting the selection mark. - /// or is null. - internal DocumentSelectionMark(string state, DocumentSpan span, float confidence) + /// is null. + internal DocumentSelectionMark(DocumentSelectionMarkState state, DocumentSpan span, float confidence) { - Argument.AssertNotNull(state, nameof(state)); Argument.AssertNotNull(span, nameof(span)); State = state; @@ -43,7 +42,7 @@ internal DocumentSelectionMark(string state, DocumentSpan span, float confidence /// /// Location of the selection mark in the reading order concatenated content. /// Confidence of correctly extracting the selection mark. - internal DocumentSelectionMark(string state, IReadOnlyList polygon, DocumentSpan span, float confidence) + internal DocumentSelectionMark(DocumentSelectionMarkState state, IReadOnlyList polygon, DocumentSpan span, float confidence) { State = state; Polygon = polygon; @@ -52,7 +51,7 @@ internal DocumentSelectionMark(string state, IReadOnlyList polygon, Docum } /// State of the selection mark. - public string State { get; } + public DocumentSelectionMarkState State { get; } /// /// Bounding polygon of the selection mark, with coordinates specified relative /// to the top-left of the page. The numbers represent the x, y values of the diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSelectionMarkState.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSelectionMarkState.cs new file mode 100644 index 000000000000..a78539041da2 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSelectionMarkState.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.DocumentIntelligence +{ + /// State of the selection mark. + public readonly partial struct DocumentSelectionMarkState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DocumentSelectionMarkState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SelectedValue = "selected"; + private const string UnselectedValue = "unselected"; + + /// + /// The selection mark is selected, often indicated by a check ✓ or cross X inside + /// the selection mark. + /// + public static DocumentSelectionMarkState Selected { get; } = new DocumentSelectionMarkState(SelectedValue); + /// The selection mark is not selected. + public static DocumentSelectionMarkState Unselected { get; } = new DocumentSelectionMarkState(UnselectedValue); + /// Determines if two values are the same. + public static bool operator ==(DocumentSelectionMarkState left, DocumentSelectionMarkState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DocumentSelectionMarkState left, DocumentSelectionMarkState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DocumentSelectionMarkState(string value) => new DocumentSelectionMarkState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DocumentSelectionMarkState other && Equals(other); + /// + public bool Equals(DocumentSelectionMarkState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSignatureType.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSignatureType.cs new file mode 100644 index 000000000000..ca8ff73a8537 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSignatureType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.DocumentIntelligence +{ + /// Presence of signature. + public readonly partial struct DocumentSignatureType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DocumentSignatureType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SignedValue = "signed"; + private const string UnsignedValue = "unsigned"; + + /// A signature is detected. + public static DocumentSignatureType Signed { get; } = new DocumentSignatureType(SignedValue); + /// No signatures are detected. + public static DocumentSignatureType Unsigned { get; } = new DocumentSignatureType(UnsignedValue); + /// Determines if two values are the same. + public static bool operator ==(DocumentSignatureType left, DocumentSignatureType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DocumentSignatureType left, DocumentSignatureType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DocumentSignatureType(string value) => new DocumentSignatureType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DocumentSignatureType other && Equals(other); + /// + public bool Equals(DocumentSignatureType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSpan.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSpan.Serialization.cs new file mode 100644 index 000000000000..299c3fce8b0d --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSpan.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentSpan + { + internal static DocumentSpan DeserializeDocumentSpan(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int offset = default; + int length = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("offset"u8)) + { + offset = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("length"u8)) + { + length = property.Value.GetInt32(); + continue; + } + } + return new DocumentSpan(offset, length); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentSpan FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentSpan(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentStyle.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentStyle.Serialization.cs new file mode 100644 index 000000000000..45daa7536ea6 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentStyle.Serialization.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentStyle + { + internal static DocumentStyle DeserializeDocumentStyle(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional isHandwritten = default; + Optional similarFontFamily = default; + Optional fontStyle = default; + Optional fontWeight = default; + Optional color = default; + Optional backgroundColor = default; + IReadOnlyList spans = default; + float confidence = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("isHandwritten"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isHandwritten = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("similarFontFamily"u8)) + { + similarFontFamily = property.Value.GetString(); + continue; + } + if (property.NameEquals("fontStyle"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + fontStyle = new FontStyle(property.Value.GetString()); + continue; + } + if (property.NameEquals("fontWeight"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + fontWeight = new FontWeight(property.Value.GetString()); + continue; + } + if (property.NameEquals("color"u8)) + { + color = property.Value.GetString(); + continue; + } + if (property.NameEquals("backgroundColor"u8)) + { + backgroundColor = property.Value.GetString(); + continue; + } + if (property.NameEquals("spans"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentSpan.DeserializeDocumentSpan(item)); + } + spans = array; + continue; + } + if (property.NameEquals("confidence"u8)) + { + confidence = property.Value.GetSingle(); + continue; + } + } + return new DocumentStyle(Optional.ToNullable(isHandwritten), similarFontFamily.Value, Optional.ToNullable(fontStyle), Optional.ToNullable(fontWeight), color.Value, backgroundColor.Value, spans, confidence); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentStyle FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentStyle(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentStyle.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentStyle.cs index e1b382c438fc..5764418f24cb 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentStyle.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentStyle.cs @@ -39,7 +39,7 @@ internal DocumentStyle(IEnumerable spans, float confidence) /// Background color in #rrggbb hexadecimal format.. /// Location of the text elements in the concatenated content the style applies to. /// Confidence of correctly identifying the style. - internal DocumentStyle(bool? isHandwritten, string similarFontFamily, string fontStyle, string fontWeight, string color, string backgroundColor, IReadOnlyList spans, float confidence) + internal DocumentStyle(bool? isHandwritten, string similarFontFamily, FontStyle? fontStyle, FontWeight? fontWeight, string color, string backgroundColor, IReadOnlyList spans, float confidence) { IsHandwritten = isHandwritten; SimilarFontFamily = similarFontFamily; @@ -59,9 +59,9 @@ internal DocumentStyle(bool? isHandwritten, string similarFontFamily, string fon /// public string SimilarFontFamily { get; } /// Font style. - public string FontStyle { get; } + public FontStyle? FontStyle { get; } /// Font weight. - public string FontWeight { get; } + public FontWeight? FontWeight { get; } /// Foreground color in #rrggbb hexadecimal format. public string Color { get; } /// Background color in #rrggbb hexadecimal format.. diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTable.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTable.Serialization.cs new file mode 100644 index 000000000000..61d61b65a7fc --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTable.Serialization.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentTable + { + internal static DocumentTable DeserializeDocumentTable(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int rowCount = default; + int columnCount = default; + IReadOnlyList cells = default; + Optional> boundingRegions = default; + IReadOnlyList spans = default; + Optional caption = default; + Optional> footnotes = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("rowCount"u8)) + { + rowCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("columnCount"u8)) + { + columnCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("cells"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentTableCell.DeserializeDocumentTableCell(item)); + } + cells = array; + continue; + } + if (property.NameEquals("boundingRegions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BoundingRegion.DeserializeBoundingRegion(item)); + } + boundingRegions = array; + continue; + } + if (property.NameEquals("spans"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentSpan.DeserializeDocumentSpan(item)); + } + spans = array; + continue; + } + if (property.NameEquals("caption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + caption = DocumentCaption.DeserializeDocumentCaption(property.Value); + continue; + } + if (property.NameEquals("footnotes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentFootnote.DeserializeDocumentFootnote(item)); + } + footnotes = array; + continue; + } + } + return new DocumentTable(rowCount, columnCount, cells, Optional.ToList(boundingRegions), spans, caption.Value, Optional.ToList(footnotes)); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentTable FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentTable(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTableCell.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTableCell.Serialization.cs new file mode 100644 index 000000000000..0fe187c84e5c --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTableCell.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentTableCell + { + internal static DocumentTableCell DeserializeDocumentTableCell(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional kind = default; + int rowIndex = default; + int columnIndex = default; + Optional rowSpan = default; + Optional columnSpan = default; + string content = default; + Optional> boundingRegions = default; + IReadOnlyList spans = default; + Optional> elements = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + kind = new DocumentTableCellKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("rowIndex"u8)) + { + rowIndex = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("columnIndex"u8)) + { + columnIndex = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("rowSpan"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + rowSpan = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("columnSpan"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + columnSpan = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("content"u8)) + { + content = property.Value.GetString(); + continue; + } + if (property.NameEquals("boundingRegions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BoundingRegion.DeserializeBoundingRegion(item)); + } + boundingRegions = array; + continue; + } + if (property.NameEquals("spans"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentSpan.DeserializeDocumentSpan(item)); + } + spans = array; + continue; + } + if (property.NameEquals("elements"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + elements = array; + continue; + } + } + return new DocumentTableCell(Optional.ToNullable(kind), rowIndex, columnIndex, Optional.ToNullable(rowSpan), Optional.ToNullable(columnSpan), content, Optional.ToList(boundingRegions), spans, Optional.ToList(elements)); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentTableCell FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentTableCell(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTableCell.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTableCell.cs index 2bdf60ff577e..1042dee81d5a 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTableCell.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTableCell.cs @@ -44,7 +44,7 @@ internal DocumentTableCell(int rowIndex, int columnIndex, string content, IEnume /// Bounding regions covering the table cell. /// Location of the table cell in the reading order concatenated content. /// Child elements of the table cell. - internal DocumentTableCell(string kind, int rowIndex, int columnIndex, int? rowSpan, int? columnSpan, string content, IReadOnlyList boundingRegions, IReadOnlyList spans, IReadOnlyList elements) + internal DocumentTableCell(DocumentTableCellKind? kind, int rowIndex, int columnIndex, int? rowSpan, int? columnSpan, string content, IReadOnlyList boundingRegions, IReadOnlyList spans, IReadOnlyList elements) { Kind = kind; RowIndex = rowIndex; @@ -58,7 +58,7 @@ internal DocumentTableCell(string kind, int rowIndex, int columnIndex, int? rowS } /// Table cell kind. - public string Kind { get; } + public DocumentTableCellKind? Kind { get; } /// Row index of the cell. public int RowIndex { get; } /// Column index of the cell. diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTableCellKind.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTableCellKind.cs new file mode 100644 index 000000000000..c35ac550de17 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTableCellKind.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.DocumentIntelligence +{ + /// Table cell kind. + public readonly partial struct DocumentTableCellKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DocumentTableCellKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ContentValue = "content"; + private const string RowHeaderValue = "rowHeader"; + private const string ColumnHeaderValue = "columnHeader"; + private const string StubHeadValue = "stubHead"; + private const string DescriptionValue = "description"; + + /// Contains the main content/data. + public static DocumentTableCellKind Content { get; } = new DocumentTableCellKind(ContentValue); + /// Describes the content of the row. + public static DocumentTableCellKind RowHeader { get; } = new DocumentTableCellKind(RowHeaderValue); + /// Describes the content of the column. + public static DocumentTableCellKind ColumnHeader { get; } = new DocumentTableCellKind(ColumnHeaderValue); + /// Describes the row headers, usually located at the top left corner of a table. + public static DocumentTableCellKind StubHead { get; } = new DocumentTableCellKind(StubHeadValue); + /// Describes the content in (parts of) the table. + public static DocumentTableCellKind Description { get; } = new DocumentTableCellKind(DescriptionValue); + /// Determines if two values are the same. + public static bool operator ==(DocumentTableCellKind left, DocumentTableCellKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DocumentTableCellKind left, DocumentTableCellKind right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DocumentTableCellKind(string value) => new DocumentTableCellKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DocumentTableCellKind other && Equals(other); + /// + public bool Equals(DocumentTableCellKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentWord.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentWord.Serialization.cs new file mode 100644 index 000000000000..cd2c2003f355 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentWord.Serialization.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.DocumentIntelligence +{ + public partial class DocumentWord + { + internal static DocumentWord DeserializeDocumentWord(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string content = default; + Optional> polygon = default; + DocumentSpan span = default; + float confidence = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("content"u8)) + { + content = property.Value.GetString(); + continue; + } + if (property.NameEquals("polygon"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetSingle()); + } + polygon = array; + continue; + } + if (property.NameEquals("span"u8)) + { + span = DocumentSpan.DeserializeDocumentSpan(property.Value); + continue; + } + if (property.NameEquals("confidence"u8)) + { + confidence = property.Value.GetSingle(); + continue; + } + } + return new DocumentWord(content, Optional.ToList(polygon), span, confidence); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentWord FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentWord(document.RootElement); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/FontStyle.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/FontStyle.cs new file mode 100644 index 000000000000..2a90ea130cc0 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/FontStyle.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.DocumentIntelligence +{ + /// Font style. + public readonly partial struct FontStyle : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FontStyle(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NormalValue = "normal"; + private const string ItalicValue = "italic"; + + /// Characters are represented normally. + public static FontStyle Normal { get; } = new FontStyle(NormalValue); + /// Characters are visually slanted to the right. + public static FontStyle Italic { get; } = new FontStyle(ItalicValue); + /// Determines if two values are the same. + public static bool operator ==(FontStyle left, FontStyle right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FontStyle left, FontStyle right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator FontStyle(string value) => new FontStyle(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FontStyle other && Equals(other); + /// + public bool Equals(FontStyle other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/FontWeight.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/FontWeight.cs new file mode 100644 index 000000000000..67a390d233ab --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/FontWeight.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.DocumentIntelligence +{ + /// Font weight. + public readonly partial struct FontWeight : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FontWeight(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NormalValue = "normal"; + private const string BoldValue = "bold"; + + /// Characters are represented normally. + public static FontWeight Normal { get; } = new FontWeight(NormalValue); + /// Characters are represented with thicker strokes. + public static FontWeight Bold { get; } = new FontWeight(BoldValue); + /// Determines if two values are the same. + public static bool operator ==(FontWeight left, FontWeight right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FontWeight left, FontWeight right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator FontWeight(string value) => new FontWeight(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FontWeight other && Equals(other); + /// + public bool Equals(FontWeight other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/LengthUnit.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/LengthUnit.cs new file mode 100644 index 000000000000..8481f33359e5 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/LengthUnit.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.DocumentIntelligence +{ + /// The unit used by the width, height, and polygon properties. For images, the unit is "pixel". For PDF, the unit is "inch". + public readonly partial struct LengthUnit : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public LengthUnit(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PixelValue = "pixel"; + private const string InchValue = "inch"; + + /// Length unit for image files. + public static LengthUnit Pixel { get; } = new LengthUnit(PixelValue); + /// Length unit for PDF files. + public static LengthUnit Inch { get; } = new LengthUnit(InchValue); + /// Determines if two values are the same. + public static bool operator ==(LengthUnit left, LengthUnit right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(LengthUnit left, LengthUnit right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator LengthUnit(string value) => new LengthUnit(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is LengthUnit other && Equals(other); + /// + public bool Equals(LengthUnit other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ParagraphRole.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ParagraphRole.cs new file mode 100644 index 000000000000..7125db4a4ebe --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ParagraphRole.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.DocumentIntelligence +{ + /// Semantic role of the paragraph. + public readonly partial struct ParagraphRole : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ParagraphRole(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PageHeaderValue = "pageHeader"; + private const string PageFooterValue = "pageFooter"; + private const string PageNumberValue = "pageNumber"; + private const string TitleValue = "title"; + private const string SectionHeadingValue = "sectionHeading"; + private const string FootnoteValue = "footnote"; + private const string FormulaBlockValue = "formulaBlock"; + + /// Text near the top edge of the page. + public static ParagraphRole PageHeader { get; } = new ParagraphRole(PageHeaderValue); + /// Text near the bottom edge of the page. + public static ParagraphRole PageFooter { get; } = new ParagraphRole(PageFooterValue); + /// Page number. + public static ParagraphRole PageNumber { get; } = new ParagraphRole(PageNumberValue); + /// Top-level title describing the entire document. + public static ParagraphRole Title { get; } = new ParagraphRole(TitleValue); + /// Sub heading describing a section of the document. + public static ParagraphRole SectionHeading { get; } = new ParagraphRole(SectionHeadingValue); + /// A note usually placed after the main content on a page. + public static ParagraphRole Footnote { get; } = new ParagraphRole(FootnoteValue); + /// A block of formulas, often with shared alignment. + public static ParagraphRole FormulaBlock { get; } = new ParagraphRole(FormulaBlockValue); + /// Determines if two values are the same. + public static bool operator ==(ParagraphRole left, ParagraphRole right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ParagraphRole left, ParagraphRole right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ParagraphRole(string value) => new ParagraphRole(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ParagraphRole other && Equals(other); + /// + public bool Equals(ParagraphRole other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Assets/IRS-1040_2.pdf b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Assets/IRS-1040_2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e3df747fddc73bbfcd35080c51f0869116f96616 GIT binary patch literal 175340 zcmcfJ1y~l_+Bkf=5lI0-9+XDvp-bs*kQAi5L1}4e6cDAmK}0~MTN;#*Qa~E%l8*lZ zWp8~C?>U_J+t;@@moQJv+_PrQir?HblnNqZ3@nW7Xq1yvAN$Z)Aj}XOeRDKEJ~Sp3 z7h59;lY*X!kpmi&u+2kjM+h4lleC$k14IkL3O=X=VLSVm{p??kvwyYG?%Y8$vNk+j z2^73?zA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z>kHtJttMU`exOn0y&u-($egrKtW62VPPNhcN~W3z<9wF9NvaHi(gk0?N6ivoMq?v} z@Mxe2Tq({sv>cFW-Jp|`)p}OT)?*!a_JU9CbnO~baxQkZQWG`Ye{RvIYW2%W4CApqsohvqa8ti>7#3bYFl5r{fW8L3a z5mL(=XGzn;f;jehw5w;~>!#k9)r=(_+b&zwu+H+r>yp6k_Vn1|{GsT#9C?IeQ@^kY zRfSwJ&0GuWDU0nFI2|3oQ{^54I<>&;Rw)&M@alJZ6#H;M6srObJ%PmzTzAKv=^cELwxem0Zu5>EjL86Qm)vcrYSZ8N})A;te==MMFWpBimm5* ztEW!VZi8>S7-e%+y z{~Qup;c|*>y8OfPNi~fD5rJyN3s%iwsJ@wDN_v5^z(ox3w%4vk9yo36Ok?ue&tZjV z+-gO!HG6qS8Cz6vZgillX^CoNQvRI54=GqNV}ltwy1^`H5d7(0ZMf7^c8Du*4C{x3_1MOj2(4;)&9miAh@%oFTvu5E*G0WTPYC9Ql!^ht_tmb|Vl8w(hmrAPm9H24o8$8+C1M z0XilKrXa7p(en3bWyr==Kgr_5$UafNn3s+9Z^L!*aC6!mtc^7U=Y(_KAa??($!w-( zV~wtL{QhJ!5b|mBznLj8xxc0Q2M5WPEl%`|}^ z3?B3!IC%a8 z*8u%Ra-@I&ot6wUOun;i96Wkv#D-J&j*eZvS$gUhl0p3Jw>&p4MeW zs%etOTk*~MCkKt1JBi`j2GqYd-e>uG-6;tyG4J^;?*WV~wuZO)67Mfxw2=(#O|XXt z3X+8ZpC1ljmjeZPd6+zCYr&c^1#%8rpZEqZ2P_1WFc5@6Z8ZEkh(ewoAmuh;hb spans) + { + var span = spans.Single(); + + Assert.That(span.Offset, Is.EqualTo(0)); + Assert.That(span.Length, Is.EqualTo(0)); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentModelAdministrationClient/MiscellaneousOperationsLiveTests.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentModelAdministrationClient/MiscellaneousOperationsLiveTests.cs new file mode 100644 index 000000000000..756c1f42e391 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentModelAdministrationClient/MiscellaneousOperationsLiveTests.cs @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.AI.DocumentIntelligence.Tests +{ + public class MiscellaneousOperationsLiveTests : DocumentIntelligenceLiveTestBase + { + public MiscellaneousOperationsLiveTests(bool isAsync) + : base(isAsync) + { + } + + #region Resource Info + + [RecordedTest] + public async Task GetResourceInfo() + { + var client = CreateDocumentModelAdministrationClient(); + var startTime = Recording.UtcNow; + + // Ensure we will have at least one custom model to populate the resource details. + await using var disposableModel = await BuildDisposableDocumentModelAsync(TestEnvironment.BlobContainerSasUrl); + + ResourceDetails resourceDetails = await client.GetResourceInfoAsync(); + + Assert.That(resourceDetails.CustomDocumentModels, Is.Not.Null); + Assert.That(resourceDetails.CustomDocumentModels.Count, Is.GreaterThan(0)); + Assert.That(resourceDetails.CustomDocumentModels.Limit, Is.GreaterThanOrEqualTo(resourceDetails.CustomDocumentModels.Count)); + + Assert.That(resourceDetails.CustomNeuralDocumentModelBuilds, Is.Not.Null); + Assert.That(resourceDetails.CustomNeuralDocumentModelBuilds.Used, Is.GreaterThanOrEqualTo(0)); + Assert.That(resourceDetails.CustomNeuralDocumentModelBuilds.Quota, Is.GreaterThanOrEqualTo(resourceDetails.CustomNeuralDocumentModelBuilds.Used)); + Assert.That(resourceDetails.CustomNeuralDocumentModelBuilds.QuotaResetDateTime, Is.GreaterThan(startTime)); + } + + #endregion Resource Info + + #region Get Operation + + [RecordedTest] + [Ignore("Calling Operation.Id throws a NotSupportedException: https://github.com/Azure/autorest.csharp/issues/2158")] + public async Task GetOperationWithDocumentModelBuild() + { + var client = CreateDocumentModelAdministrationClient(); + var description = "This model was generated by a .NET test."; + var tags = new Dictionary() { { "tag1", "value1" }, { "tag2", "value2" } }; + var startTime = Recording.UtcNow; + + await using var disposableModel = await BuildDisposableDocumentModelAsync(TestEnvironment.BlobContainerSasUrl, description, tags); + + var operationId = new Guid(disposableModel.Operation.Id); + + OperationDetails operationDetails = await client.GetOperationAsync(operationId); + + var resourceLocation = $"{TestEnvironment.Endpoint}formrecognizer/documentModels/{disposableModel.ModelId}?api-version={ServiceVersionString}"; + + ValidateOperationDetails(operationDetails, operationId, resourceLocation, startTime, tags); + + var buildOperationDetails = operationDetails as DocumentModelBuildOperationDetails; + + Assert.That(buildOperationDetails, Is.Not.Null); + + DocumentAssert.AreEqual(disposableModel.Value, buildOperationDetails.Result); + } + + [RecordedTest] + [Ignore("Calling Operation.Id throws a NotSupportedException: https://github.com/Azure/autorest.csharp/issues/2158")] + public async Task GetOperationWithDocumentClassifierBuild() + { + var client = CreateDocumentModelAdministrationClient(); + var description = "This model was generated by a .NET test."; + var tags = new Dictionary(); + var startTime = Recording.UtcNow; + + await using var disposableClassifier = await BuildDisposableDocumentClassifierAsync(description); + + var operationId = new Guid(disposableClassifier.ClassifierId); + + OperationDetails operationDetails = await client.GetOperationAsync(operationId); + + var resourceLocation = $"{TestEnvironment.Endpoint}formrecognizer/documentClassifiers/{disposableClassifier.ClassifierId}?api-version={ServiceVersionString}"; + + ValidateOperationDetails(operationDetails, operationId, resourceLocation, startTime, tags); + + var buildOperationDetails = operationDetails as DocumentClassifierBuildOperationDetails; + + Assert.That(buildOperationDetails, Is.Not.Null); + + DocumentAssert.AreEqual(disposableClassifier.Value, buildOperationDetails.Result); + } + + [RecordedTest] + public void GetOperationCanParseError() + { + var client = CreateDocumentModelAdministrationClient(); + var operationId = new Guid("00000000-0000-0000-0000-000000000000"); + + RequestFailedException ex = Assert.ThrowsAsync(() => client.GetOperationAsync(operationId)); + + Assert.That(ex.ErrorCode, Is.EqualTo("NotFound")); + } + + #endregion Get Operation + + #region List Operations + + [RecordedTest] + [Ignore("Calling Operation.Id throws a NotSupportedException: https://github.com/Azure/autorest.csharp/issues/2158")] + public async Task GetOperations() + { + var client = CreateDocumentModelAdministrationClient(); + var description = "This model was generated by a .NET test."; + var tags = new Dictionary() { { "tag1", "value1" }, { "tag2", "value2" } }; + + // Once model caching is implemented, we should make the models slightly different to make sure the cache won't return copies of the same model. + await using var disposableModel0 = await BuildDisposableDocumentModelAsync(TestEnvironment.BlobContainerSasUrl, description, tags); + await using var disposableModel1 = await BuildDisposableDocumentModelAsync(TestEnvironment.BlobContainerSasUrl, description, tags); + + var operationId0 = new Guid(disposableModel0.Operation.Id); + var operationId1 = new Guid(disposableModel1.Operation.Id); + + OperationDetails operationDetails0 = await client.GetOperationAsync(operationId0); + OperationDetails operationDetails1 = await client.GetOperationAsync(operationId1); + + var expectedIdMapping = new Dictionary() + { + { operationId0, operationDetails0 }, + { operationId1, operationDetails1 } + }; + var idMapping = new Dictionary(); + + await foreach (OperationSummary operationSummary in client.GetOperationsAsync()) + { + if (expectedIdMapping.ContainsKey(operationSummary.OperationId)) + { + idMapping.Add(operationSummary.OperationId, operationSummary); + } + + if (idMapping.Count == expectedIdMapping.Count) + { + break; + } + } + + Assert.That(idMapping.Count, Is.EqualTo(expectedIdMapping.Count)); + + foreach (Guid id in expectedIdMapping.Keys) + { + Assert.That(idMapping, Contains.Key(id)); + + OperationDetails expected = expectedIdMapping[id]; + OperationSummary operationSummary = idMapping[id]; + + Assert.That(operationSummary.OperationId, Is.EqualTo(expected.OperationId)); + Assert.That(operationSummary.ApiVersion, Is.EqualTo(expected.ApiVersion)); + Assert.That(operationSummary.Status, Is.EqualTo(expected.Status)); + Assert.That(operationSummary.PercentCompleted, Is.EqualTo(expected.PercentCompleted)); + Assert.That(operationSummary.ResourceLocation.AbsoluteUri, Is.EqualTo(expected.ResourceLocation.AbsoluteUri)); + Assert.That(operationSummary.CreatedDateTime, Is.EqualTo(expected.CreatedDateTime)); + Assert.That(operationSummary.LastUpdatedDateTime, Is.EqualTo(expected.LastUpdatedDateTime)); + Assert.That(operationSummary.Tags, Is.EquivalentTo(expected.Tags)); + } + } + + #endregion List Operations + + private void ValidateOperationDetails(OperationDetails operationDetails, Guid operationId, string resourceLocation, DateTimeOffset startTime, IDictionary tags) + { + Assert.That(operationDetails.OperationId, Is.EqualTo(operationId)); + Assert.That(operationDetails.Status, Is.EqualTo(OperationStatus.Succeeded)); + Assert.That(operationDetails.PercentCompleted, Is.EqualTo(100)); + Assert.That(operationDetails.ResourceLocation.AbsoluteUri, Is.EqualTo(resourceLocation)); + + Assert.That(operationDetails.ApiVersion, Is.Null); + Assert.That(operationDetails.Error, Is.Null); + + // Add a 4-hour tolerance because the model could have been cached before this test. + Assert.That(operationDetails.CreatedDateTime, Is.GreaterThan(startTime - TimeSpan.FromHours(4))); + Assert.That(operationDetails.LastUpdatedDateTime, Is.GreaterThan(operationDetails.CreatedDateTime)); + Assert.That(operationDetails.Tags, Is.EquivalentTo(tags)); + } + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceLiveTestBase.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceLiveTestBase.cs index a3ed51f57558..eb5321fbe725 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceLiveTestBase.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceLiveTestBase.cs @@ -35,6 +35,16 @@ public DocumentIntelligenceLiveTestBase(bool isAsync, RecordedTestMode? mode = n protected string ServiceVersionString { get; } = "2023-07-31"; + protected DocumentAnalysisClient CreateDocumentAnalysisClient() + { + var endpoint = new Uri(TestEnvironment.Endpoint); + var credential = new AzureKeyCredential(TestEnvironment.ApiKey); + + var nonInstrumentedClient = new DocumentAnalysisClient(endpoint, credential, _clientOptions); + + return InstrumentClient(nonInstrumentedClient); + } + protected DocumentModelAdministrationClient CreateDocumentModelAdministrationClient() { var endpoint = new Uri(TestEnvironment.Endpoint); diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceTestEnvironment.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceTestEnvironment.cs index e3ac0356419f..4d2e4372f2fd 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceTestEnvironment.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceTestEnvironment.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System; using Azure.Core.TestFramework; namespace Azure.AI.DocumentIntelligence.Tests @@ -9,6 +10,12 @@ public class DocumentIntelligenceTestEnvironment : TestEnvironment { private const string SanitizedSasUrl = "https://sanitized.blob.core.windows.net"; + private const string AssetsFolderName = "Assets"; + + // We are using assets from the old Form Recognizer package while this package hasn't moved to the public repository. + // Files are exactly the same, so this doesn't affect test behavior. + private const string FileUriFormat = "https://raw.githubusercontent.com/Azure/azure-sdk-for-net/main/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/{0}/{1}"; + public string Endpoint => GetRecordedVariable("ENDPOINT"); public string ApiKey => GetRecordedVariable("API_KEY", options => options.IsSecret()); @@ -20,5 +27,12 @@ public class DocumentIntelligenceTestEnvironment : TestEnvironment public string BlobContainerSasUrl => GetRecordedVariable("SINGLEPAGE_BLOB_CONTAINER_SAS_URL", options => options.IsSecret(SanitizedSasUrl)); public string ClassifierTrainingSasUrl => GetRecordedVariable("CLASSIFIER_BLOB_CONTAINER_SAS_URL", options => options.IsSecret(SanitizedSasUrl)); + + public static Uri CreateUri(string filename) + { + var uriString = string.Format(FileUriFormat, AssetsFolderName, filename); + + return new Uri(uriString); + } } } diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/TestFile.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/TestFile.cs new file mode 100644 index 000000000000..e21b699fe0a7 --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/TestFile.cs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.AI.DocumentIntelligence.Tests +{ + internal static class TestFile + { + public const string Blank = "blank.pdf"; + + public const string Irs1040 = "IRS-1040_2.pdf"; + } +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tsp-location.yaml b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tsp-location.yaml index 0e3f526a04eb..217f2358cb6a 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tsp-location.yaml +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tsp-location.yaml @@ -1,3 +1,3 @@ directory: specification/cognitiveservices/DocumentIntelligence -commit: 33a6bff341d8d8f842412fdec67fc67fa21113ad +commit: 6d4f448a83ac23456b8fc14f9ba5e685ae9eb215 repo: Azure/azure-rest-api-specs-pr From 6bbd5913896d6165ac4052e202c4e95c64b04450 Mon Sep 17 00:00:00 2001 From: Caio Saldanha Date: Mon, 13 Nov 2023 15:34:02 -0800 Subject: [PATCH 5/5] [DocumentIntelligence] Generated from latest spec + added recordings (#39936) * Generated from the latest spec * Added recordings --- ....AI.DocumentIntelligence.netstandard2.0.cs | 133 ++++-------- .../Azure.AI.DocumentIntelligence/assets.json | 6 + .../src/DocumentModelDetails.Serialization.cs | 2 +- ...mentIntelligenceClientBuilderExtensions.cs | 18 ++ .../AIDocumentIntelligenceModelFactory.cs | 119 ++--------- ...zureAIDocumentIntelligenceClientOptions.cs | 8 +- ...ndexBuildOperationDetails.Serialization.cs | 125 ----------- .../ChatIndexBuildOperationDetails.cs | 50 ----- .../ChatIndexDetails.Serialization.cs | 61 ------ .../src/Generated/ChatIndexDetails.cs | 28 --- .../src/Generated/ChatIndexSummary.cs | 42 ---- .../DocumentModelAdministrationClient.xml | 198 ++++++++++-------- .../src/Generated/DocumentAnalysisClient.cs | 28 +++ .../DocumentCaption.Serialization.cs | 13 +- .../src/Generated/DocumentCaption.cs | 6 +- ...DocumentClassifierBuildOperationDetails.cs | 3 +- .../Generated/DocumentFigure.Serialization.cs | 13 +- .../src/Generated/DocumentFigure.cs | 6 +- .../DocumentFootnote.Serialization.cs | 13 +- .../src/Generated/DocumentFootnote.cs | 6 +- .../Generated/DocumentIntelligenceError.cs | 26 +-- .../DocumentListItem.Serialization.cs | 13 +- .../src/Generated/DocumentListItem.cs | 6 +- .../DocumentModelAdministrationClient.cs | 86 +++++--- .../DocumentModelBuildOperationDetails.cs | 3 +- .../DocumentModelComposeOperationDetails.cs | 3 +- .../DocumentModelCopyToOperationDetails.cs | 3 +- .../DocumentModelDetails.Serialization.cs | 82 ++++---- .../src/Generated/DocumentModelDetails.cs | 32 ++- .../DocumentModelSummary.Serialization.cs | 87 -------- .../src/Generated/DocumentModelSummary.cs | 58 ----- .../DocumentSection.Serialization.cs | 13 +- .../src/Generated/DocumentSection.cs | 6 +- .../DocumentTableCell.Serialization.cs | 13 +- .../src/Generated/DocumentTableCell.cs | 6 +- .../src/Generated/InnerError.Serialization.cs | 4 +- .../src/Generated/InnerError.cs | 30 +-- .../OperationDetails.Serialization.cs | 1 - .../src/Generated/OperationDetails.cs | 8 +- .../src/Generated/OperationKind.cs | 5 +- .../OperationSummary.Serialization.cs | 105 ---------- .../src/Generated/OperationSummary.cs | 80 ------- .../src/Generated/UnknownOperationDetails.cs | 3 +- .../DocumentClassifierLiveTests.cs | 15 +- .../DocumentModelAdministrationLiveTests.cs | 18 +- .../MiscellaneousOperationsLiveTests.cs | 38 ++-- ...mples_DocumentModelAdministrationClient.cs | 190 ++++++++++------- .../Infrastructure/DisposableDocumentModel.cs | 2 +- .../DocumentIntelligenceLiveTestBase.cs | 30 +-- .../tsp-location.yaml | 2 +- sdk/documentintelligence/ci.yml | 14 +- 51 files changed, 592 insertions(+), 1268 deletions(-) create mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/assets.json delete mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexBuildOperationDetails.Serialization.cs delete mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexBuildOperationDetails.cs delete mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexDetails.Serialization.cs delete mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexDetails.cs delete mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexSummary.cs delete mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelSummary.Serialization.cs delete mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelSummary.cs delete mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationSummary.Serialization.cs delete mode 100644 sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationSummary.cs diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/api/Azure.AI.DocumentIntelligence.netstandard2.0.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/api/Azure.AI.DocumentIntelligence.netstandard2.0.cs index e52d486aea6c..da1ba23d9c2e 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/api/Azure.AI.DocumentIntelligence.netstandard2.0.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/api/Azure.AI.DocumentIntelligence.netstandard2.0.cs @@ -24,18 +24,16 @@ public static partial class AIDocumentIntelligenceModelFactory public static Azure.AI.DocumentIntelligence.AnalyzedDocument AnalyzedDocument(string docType = null, System.Collections.Generic.IEnumerable boundingRegions = null, System.Collections.Generic.IEnumerable spans = null, System.Collections.Generic.IReadOnlyDictionary fields = null, float confidence = 0f) { throw null; } public static Azure.AI.DocumentIntelligence.AnalyzeResult AnalyzeResult(string apiVersion = null, string modelId = null, Azure.AI.DocumentIntelligence.StringIndexType stringIndexType = default(Azure.AI.DocumentIntelligence.StringIndexType), Azure.AI.DocumentIntelligence.ContentFormat? contentFormat = default(Azure.AI.DocumentIntelligence.ContentFormat?), string content = null, System.Collections.Generic.IEnumerable pages = null, System.Collections.Generic.IEnumerable paragraphs = null, System.Collections.Generic.IEnumerable tables = null, System.Collections.Generic.IEnumerable figures = null, System.Collections.Generic.IEnumerable lists = null, System.Collections.Generic.IEnumerable sections = null, System.Collections.Generic.IEnumerable keyValuePairs = null, System.Collections.Generic.IEnumerable styles = null, System.Collections.Generic.IEnumerable languages = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } public static Azure.AI.DocumentIntelligence.BoundingRegion BoundingRegion(int pageNumber = 0, System.Collections.Generic.IEnumerable polygon = null) { throw null; } - public static Azure.AI.DocumentIntelligence.ChatIndexBuildOperationDetails ChatIndexBuildOperationDetails(System.Guid operationId = default(System.Guid), Azure.AI.DocumentIntelligence.OperationStatus status = default(Azure.AI.DocumentIntelligence.OperationStatus), int? percentCompleted = default(int?), System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.Uri resourceLocation = null, string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary tags = null, Azure.AI.DocumentIntelligence.DocumentIntelligenceError error = null, Azure.AI.DocumentIntelligence.ChatIndexDetails result = null) { throw null; } - public static Azure.AI.DocumentIntelligence.ChatIndexDetails ChatIndexDetails(string chatId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset expirationDateTime = default(System.DateTimeOffset), string apiVersion = null) { throw null; } public static Azure.AI.DocumentIntelligence.CurrencyValue CurrencyValue(double amount = 0, string currencySymbol = null, string currencyCode = null) { throw null; } public static Azure.AI.DocumentIntelligence.CustomDocumentModelsDetails CustomDocumentModelsDetails(int count = 0, int limit = 0) { throw null; } public static Azure.AI.DocumentIntelligence.DocumentBarcode DocumentBarcode(Azure.AI.DocumentIntelligence.DocumentBarcodeKind kind = default(Azure.AI.DocumentIntelligence.DocumentBarcodeKind), string value = null, System.Collections.Generic.IEnumerable polygon = null, Azure.AI.DocumentIntelligence.DocumentSpan span = null, float confidence = 0f) { throw null; } - public static Azure.AI.DocumentIntelligence.DocumentCaption DocumentCaption(string content = null, System.Collections.Generic.IEnumerable boundingRegions = null, System.Collections.Generic.IEnumerable spans = null, System.Collections.Generic.IEnumerable elements = null) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentCaption DocumentCaption(string content = null, System.Collections.Generic.IEnumerable boundingRegions = null, System.Collections.Generic.IEnumerable spans = null, System.Collections.Generic.IEnumerable elements = null) { throw null; } public static Azure.AI.DocumentIntelligence.DocumentClassifierBuildOperationDetails DocumentClassifierBuildOperationDetails(System.Guid operationId = default(System.Guid), Azure.AI.DocumentIntelligence.OperationStatus status = default(Azure.AI.DocumentIntelligence.OperationStatus), int? percentCompleted = default(int?), System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.Uri resourceLocation = null, string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary tags = null, Azure.AI.DocumentIntelligence.DocumentIntelligenceError error = null, Azure.AI.DocumentIntelligence.DocumentClassifierDetails result = null) { throw null; } public static Azure.AI.DocumentIntelligence.DocumentClassifierDetails DocumentClassifierDetails(string classifierId = null, string description = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary docTypes = null) { throw null; } public static Azure.AI.DocumentIntelligence.DocumentField DocumentField(Azure.AI.DocumentIntelligence.DocumentFieldType type = default(Azure.AI.DocumentIntelligence.DocumentFieldType), string valueString = null, System.DateTimeOffset? valueDate = default(System.DateTimeOffset?), System.TimeSpan? valueTime = default(System.TimeSpan?), string valuePhoneNumber = null, double? valueNumber = default(double?), long? valueInteger = default(long?), Azure.AI.DocumentIntelligence.DocumentSelectionMarkState? valueSelectionMark = default(Azure.AI.DocumentIntelligence.DocumentSelectionMarkState?), Azure.AI.DocumentIntelligence.DocumentSignatureType? valueSignature = default(Azure.AI.DocumentIntelligence.DocumentSignatureType?), string valueCountryRegion = null, System.Collections.Generic.IEnumerable valueArray = null, System.Collections.Generic.IReadOnlyDictionary valueObject = null, Azure.AI.DocumentIntelligence.CurrencyValue valueCurrency = null, Azure.AI.DocumentIntelligence.AddressValue valueAddress = null, bool? valueBoolean = default(bool?), string content = null, System.Collections.Generic.IEnumerable boundingRegions = null, System.Collections.Generic.IEnumerable spans = null, float? confidence = default(float?)) { throw null; } public static Azure.AI.DocumentIntelligence.DocumentFieldSchema DocumentFieldSchema(Azure.AI.DocumentIntelligence.DocumentFieldType type = default(Azure.AI.DocumentIntelligence.DocumentFieldType), string description = null, string example = null, Azure.AI.DocumentIntelligence.DocumentFieldSchema items = null, System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } - public static Azure.AI.DocumentIntelligence.DocumentFigure DocumentFigure(System.Collections.Generic.IEnumerable boundingRegions = null, System.Collections.Generic.IEnumerable spans = null, System.Collections.Generic.IEnumerable elements = null, Azure.AI.DocumentIntelligence.DocumentCaption caption = null, System.Collections.Generic.IEnumerable footnotes = null) { throw null; } - public static Azure.AI.DocumentIntelligence.DocumentFootnote DocumentFootnote(string content = null, System.Collections.Generic.IEnumerable boundingRegions = null, System.Collections.Generic.IEnumerable spans = null, System.Collections.Generic.IEnumerable elements = null) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentFigure DocumentFigure(System.Collections.Generic.IEnumerable boundingRegions = null, System.Collections.Generic.IEnumerable spans = null, System.Collections.Generic.IEnumerable elements = null, Azure.AI.DocumentIntelligence.DocumentCaption caption = null, System.Collections.Generic.IEnumerable footnotes = null) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentFootnote DocumentFootnote(string content = null, System.Collections.Generic.IEnumerable boundingRegions = null, System.Collections.Generic.IEnumerable spans = null, System.Collections.Generic.IEnumerable elements = null) { throw null; } public static Azure.AI.DocumentIntelligence.DocumentFormula DocumentFormula(Azure.AI.DocumentIntelligence.DocumentFormulaKind kind = default(Azure.AI.DocumentIntelligence.DocumentFormulaKind), string value = null, System.Collections.Generic.IEnumerable polygon = null, Azure.AI.DocumentIntelligence.DocumentSpan span = null, float confidence = 0f) { throw null; } public static Azure.AI.DocumentIntelligence.DocumentIntelligenceError DocumentIntelligenceError(string code = null, string message = null, string target = null, System.Collections.Generic.IEnumerable details = null, Azure.AI.DocumentIntelligence.InnerError innererror = null) { throw null; } public static Azure.AI.DocumentIntelligence.DocumentKeyValueElement DocumentKeyValueElement(string content = null, System.Collections.Generic.IEnumerable boundingRegions = null, System.Collections.Generic.IEnumerable spans = null) { throw null; } @@ -43,25 +41,23 @@ public static partial class AIDocumentIntelligenceModelFactory public static Azure.AI.DocumentIntelligence.DocumentLanguage DocumentLanguage(string locale = null, System.Collections.Generic.IEnumerable spans = null, float confidence = 0f) { throw null; } public static Azure.AI.DocumentIntelligence.DocumentLine DocumentLine(string content = null, System.Collections.Generic.IEnumerable polygon = null, System.Collections.Generic.IEnumerable spans = null) { throw null; } public static Azure.AI.DocumentIntelligence.DocumentList DocumentList(System.Collections.Generic.IEnumerable spans = null, System.Collections.Generic.IEnumerable items = null) { throw null; } - public static Azure.AI.DocumentIntelligence.DocumentListItem DocumentListItem(int level = 0, string content = null, System.Collections.Generic.IEnumerable boundingRegions = null, System.Collections.Generic.IEnumerable spans = null, System.Collections.Generic.IEnumerable elements = null) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentListItem DocumentListItem(int level = 0, string content = null, System.Collections.Generic.IEnumerable boundingRegions = null, System.Collections.Generic.IEnumerable spans = null, System.Collections.Generic.IEnumerable elements = null) { throw null; } public static Azure.AI.DocumentIntelligence.DocumentModelBuildOperationDetails DocumentModelBuildOperationDetails(System.Guid operationId = default(System.Guid), Azure.AI.DocumentIntelligence.OperationStatus status = default(Azure.AI.DocumentIntelligence.OperationStatus), int? percentCompleted = default(int?), System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.Uri resourceLocation = null, string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary tags = null, Azure.AI.DocumentIntelligence.DocumentIntelligenceError error = null, Azure.AI.DocumentIntelligence.DocumentModelDetails result = null) { throw null; } public static Azure.AI.DocumentIntelligence.DocumentModelComposeOperationDetails DocumentModelComposeOperationDetails(System.Guid operationId = default(System.Guid), Azure.AI.DocumentIntelligence.OperationStatus status = default(Azure.AI.DocumentIntelligence.OperationStatus), int? percentCompleted = default(int?), System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.Uri resourceLocation = null, string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary tags = null, Azure.AI.DocumentIntelligence.DocumentIntelligenceError error = null, Azure.AI.DocumentIntelligence.DocumentModelDetails result = null) { throw null; } public static Azure.AI.DocumentIntelligence.DocumentModelCopyToOperationDetails DocumentModelCopyToOperationDetails(System.Guid operationId = default(System.Guid), Azure.AI.DocumentIntelligence.OperationStatus status = default(Azure.AI.DocumentIntelligence.OperationStatus), int? percentCompleted = default(int?), System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.Uri resourceLocation = null, string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary tags = null, Azure.AI.DocumentIntelligence.DocumentIntelligenceError error = null, Azure.AI.DocumentIntelligence.DocumentModelDetails result = null) { throw null; } - public static Azure.AI.DocumentIntelligence.DocumentModelDetails DocumentModelDetails(string modelId = null, string description = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary tags = null, Azure.AI.DocumentIntelligence.DocumentBuildMode buildMode = default(Azure.AI.DocumentIntelligence.DocumentBuildMode), Azure.AI.DocumentIntelligence.AzureBlobContentSource azureBlobSource = null, Azure.AI.DocumentIntelligence.AzureBlobFileListContentSource azureBlobFileListSource = null, System.Collections.Generic.IReadOnlyDictionary docTypes = null) { throw null; } - public static Azure.AI.DocumentIntelligence.DocumentModelSummary DocumentModelSummary(string modelId = null, string description = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary tags = null) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentModelDetails DocumentModelDetails(string modelId = null, string description = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary tags = null, Azure.AI.DocumentIntelligence.DocumentBuildMode? buildMode = default(Azure.AI.DocumentIntelligence.DocumentBuildMode?), Azure.AI.DocumentIntelligence.AzureBlobContentSource azureBlobSource = null, Azure.AI.DocumentIntelligence.AzureBlobFileListContentSource azureBlobFileListSource = null, System.Collections.Generic.IReadOnlyDictionary docTypes = null) { throw null; } public static Azure.AI.DocumentIntelligence.DocumentPage DocumentPage(int pageNumber = 0, float? angle = default(float?), float? width = default(float?), float? height = default(float?), Azure.AI.DocumentIntelligence.LengthUnit? unit = default(Azure.AI.DocumentIntelligence.LengthUnit?), System.Collections.Generic.IEnumerable spans = null, System.Collections.Generic.IEnumerable words = null, System.Collections.Generic.IEnumerable selectionMarks = null, System.Collections.Generic.IEnumerable lines = null, System.Collections.Generic.IEnumerable barcodes = null, System.Collections.Generic.IEnumerable formulas = null) { throw null; } public static Azure.AI.DocumentIntelligence.DocumentParagraph DocumentParagraph(Azure.AI.DocumentIntelligence.ParagraphRole? role = default(Azure.AI.DocumentIntelligence.ParagraphRole?), string content = null, System.Collections.Generic.IEnumerable boundingRegions = null, System.Collections.Generic.IEnumerable spans = null) { throw null; } - public static Azure.AI.DocumentIntelligence.DocumentSection DocumentSection(System.Collections.Generic.IEnumerable spans = null, System.Collections.Generic.IEnumerable elements = null) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentSection DocumentSection(System.Collections.Generic.IEnumerable spans = null, System.Collections.Generic.IEnumerable elements = null) { throw null; } public static Azure.AI.DocumentIntelligence.DocumentSelectionMark DocumentSelectionMark(Azure.AI.DocumentIntelligence.DocumentSelectionMarkState state = default(Azure.AI.DocumentIntelligence.DocumentSelectionMarkState), System.Collections.Generic.IEnumerable polygon = null, Azure.AI.DocumentIntelligence.DocumentSpan span = null, float confidence = 0f) { throw null; } public static Azure.AI.DocumentIntelligence.DocumentSpan DocumentSpan(int offset = 0, int length = 0) { throw null; } public static Azure.AI.DocumentIntelligence.DocumentStyle DocumentStyle(bool? isHandwritten = default(bool?), string similarFontFamily = null, Azure.AI.DocumentIntelligence.FontStyle? fontStyle = default(Azure.AI.DocumentIntelligence.FontStyle?), Azure.AI.DocumentIntelligence.FontWeight? fontWeight = default(Azure.AI.DocumentIntelligence.FontWeight?), string color = null, string backgroundColor = null, System.Collections.Generic.IEnumerable spans = null, float confidence = 0f) { throw null; } public static Azure.AI.DocumentIntelligence.DocumentTable DocumentTable(int rowCount = 0, int columnCount = 0, System.Collections.Generic.IEnumerable cells = null, System.Collections.Generic.IEnumerable boundingRegions = null, System.Collections.Generic.IEnumerable spans = null, Azure.AI.DocumentIntelligence.DocumentCaption caption = null, System.Collections.Generic.IEnumerable footnotes = null) { throw null; } - public static Azure.AI.DocumentIntelligence.DocumentTableCell DocumentTableCell(Azure.AI.DocumentIntelligence.DocumentTableCellKind? kind = default(Azure.AI.DocumentIntelligence.DocumentTableCellKind?), int rowIndex = 0, int columnIndex = 0, int? rowSpan = default(int?), int? columnSpan = default(int?), string content = null, System.Collections.Generic.IEnumerable boundingRegions = null, System.Collections.Generic.IEnumerable spans = null, System.Collections.Generic.IEnumerable elements = null) { throw null; } + public static Azure.AI.DocumentIntelligence.DocumentTableCell DocumentTableCell(Azure.AI.DocumentIntelligence.DocumentTableCellKind? kind = default(Azure.AI.DocumentIntelligence.DocumentTableCellKind?), int rowIndex = 0, int columnIndex = 0, int? rowSpan = default(int?), int? columnSpan = default(int?), string content = null, System.Collections.Generic.IEnumerable boundingRegions = null, System.Collections.Generic.IEnumerable spans = null, System.Collections.Generic.IEnumerable elements = null) { throw null; } public static Azure.AI.DocumentIntelligence.DocumentTypeDetails DocumentTypeDetails(string description = null, Azure.AI.DocumentIntelligence.DocumentBuildMode? buildMode = default(Azure.AI.DocumentIntelligence.DocumentBuildMode?), System.Collections.Generic.IReadOnlyDictionary fieldSchema = null, System.Collections.Generic.IReadOnlyDictionary fieldConfidence = null) { throw null; } public static Azure.AI.DocumentIntelligence.DocumentWord DocumentWord(string content = null, System.Collections.Generic.IEnumerable polygon = null, Azure.AI.DocumentIntelligence.DocumentSpan span = null, float confidence = 0f) { throw null; } - public static Azure.AI.DocumentIntelligence.InnerError InnerError(string code = null, string message = null, Azure.AI.DocumentIntelligence.InnerError innererror = null) { throw null; } + public static Azure.AI.DocumentIntelligence.InnerError InnerError(string code = null, string message = null, Azure.AI.DocumentIntelligence.InnerError innerErrorObject = null) { throw null; } public static Azure.AI.DocumentIntelligence.OperationDetails OperationDetails(System.Guid operationId = default(System.Guid), Azure.AI.DocumentIntelligence.OperationStatus status = default(Azure.AI.DocumentIntelligence.OperationStatus), int? percentCompleted = default(int?), System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), string kind = "Unknown", System.Uri resourceLocation = null, string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary tags = null, Azure.AI.DocumentIntelligence.DocumentIntelligenceError error = null) { throw null; } - public static Azure.AI.DocumentIntelligence.OperationSummary OperationSummary(System.Guid operationId = default(System.Guid), Azure.AI.DocumentIntelligence.OperationStatus status = default(Azure.AI.DocumentIntelligence.OperationStatus), int? percentCompleted = default(int?), System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), Azure.AI.DocumentIntelligence.OperationKind kind = default(Azure.AI.DocumentIntelligence.OperationKind), System.Uri resourceLocation = null, string apiVersion = null, System.Collections.Generic.IReadOnlyDictionary tags = null) { throw null; } public static Azure.AI.DocumentIntelligence.QuotaDetails QuotaDetails(int used = 0, int quota = 0, System.DateTimeOffset quotaResetDateTime = default(System.DateTimeOffset)) { throw null; } public static Azure.AI.DocumentIntelligence.ResourceDetails ResourceDetails(Azure.AI.DocumentIntelligence.CustomDocumentModelsDetails customDocumentModels = null, Azure.AI.DocumentIntelligence.QuotaDetails customNeuralDocumentModelBuilds = null) { throw null; } } @@ -111,9 +107,7 @@ public partial class AzureAIDocumentIntelligenceClientOptions : Azure.Core.Clien public AzureAIDocumentIntelligenceClientOptions(Azure.AI.DocumentIntelligence.AzureAIDocumentIntelligenceClientOptions.ServiceVersion version = Azure.AI.DocumentIntelligence.AzureAIDocumentIntelligenceClientOptions.ServiceVersion.V2023_10_31_Preview) { } public enum ServiceVersion { - V2022_08_31 = 1, - V2023_07_31 = 2, - V2023_10_31_Preview = 3, + V2023_10_31_Preview = 1, } } public partial class AzureBlobContentSource @@ -151,23 +145,6 @@ public BuildDocumentModelRequest(string modelId, Azure.AI.DocumentIntelligence.D public string ModelId { get { throw null; } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } } - public partial class ChatIndexBuildOperationDetails : Azure.AI.DocumentIntelligence.OperationDetails - { - internal ChatIndexBuildOperationDetails() : base (default(Azure.AI.DocumentIntelligence.OperationStatus), default(System.DateTimeOffset), default(System.DateTimeOffset), default(System.Uri)) { } - public Azure.AI.DocumentIntelligence.ChatIndexDetails Result { get { throw null; } } - } - public partial class ChatIndexDetails : Azure.AI.DocumentIntelligence.ChatIndexSummary - { - internal ChatIndexDetails() { } - } - public partial class ChatIndexSummary - { - internal ChatIndexSummary() { } - public string ApiVersion { get { throw null; } } - public string ChatId { get { throw null; } } - public System.DateTimeOffset CreatedDateTime { get { throw null; } } - public System.DateTimeOffset ExpirationDateTime { get { throw null; } } - } public partial class ClassifierDocumentTypeDetails { public ClassifierDocumentTypeDetails() { } @@ -260,6 +237,8 @@ public partial class DocumentAnalysisClient protected DocumentAnalysisClient() { } public DocumentAnalysisClient(System.Uri endpoint, Azure.AzureKeyCredential credential) { } public DocumentAnalysisClient(System.Uri endpoint, Azure.AzureKeyCredential credential, Azure.AI.DocumentIntelligence.AzureAIDocumentIntelligenceClientOptions options) { } + public DocumentAnalysisClient(System.Uri endpoint, Azure.Core.TokenCredential credential) { } + public DocumentAnalysisClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.AI.DocumentIntelligence.AzureAIDocumentIntelligenceClientOptions options) { } public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } public virtual Azure.Operation AnalyzeDocument(Azure.WaitUntil waitUntil, string modelId, Azure.AI.DocumentIntelligence.AnalyzeDocumentRequest analyzeRequest = null, string pages = null, string locale = null, Azure.AI.DocumentIntelligence.StringIndexType? stringIndexType = default(Azure.AI.DocumentIntelligence.StringIndexType?), System.Collections.Generic.IEnumerable features = null, System.Collections.Generic.IEnumerable queryFields = null, Azure.AI.DocumentIntelligence.ContentFormat? outputContentFormat = default(Azure.AI.DocumentIntelligence.ContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Operation AnalyzeDocument(Azure.WaitUntil waitUntil, string modelId, Azure.Core.RequestContent content, string pages = null, string locale = null, string stringIndexType = null, System.Collections.Generic.IEnumerable features = null, System.Collections.Generic.IEnumerable queryFields = null, string outputContentFormat = null, Azure.RequestContext context = null) { throw null; } @@ -358,12 +337,12 @@ public partial class DocumentCaption internal DocumentCaption() { } public System.Collections.Generic.IReadOnlyList BoundingRegions { get { throw null; } } public string Content { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Elements { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Elements { get { throw null; } } public System.Collections.Generic.IReadOnlyList Spans { get { throw null; } } } public partial class DocumentClassifierBuildOperationDetails : Azure.AI.DocumentIntelligence.OperationDetails { - internal DocumentClassifierBuildOperationDetails() : base (default(Azure.AI.DocumentIntelligence.OperationStatus), default(System.DateTimeOffset), default(System.DateTimeOffset), default(System.Uri)) { } + internal DocumentClassifierBuildOperationDetails() : base (default(System.Guid), default(Azure.AI.DocumentIntelligence.OperationStatus), default(System.DateTimeOffset), default(System.DateTimeOffset), default(System.Uri)) { } public Azure.AI.DocumentIntelligence.DocumentClassifierDetails Result { get { throw null; } } } public partial class DocumentClassifierDetails @@ -443,7 +422,7 @@ public partial class DocumentFigure internal DocumentFigure() { } public System.Collections.Generic.IReadOnlyList BoundingRegions { get { throw null; } } public Azure.AI.DocumentIntelligence.DocumentCaption Caption { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Elements { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Elements { get { throw null; } } public System.Collections.Generic.IReadOnlyList Footnotes { get { throw null; } } public System.Collections.Generic.IReadOnlyList Spans { get { throw null; } } } @@ -452,7 +431,7 @@ public partial class DocumentFootnote internal DocumentFootnote() { } public System.Collections.Generic.IReadOnlyList BoundingRegions { get { throw null; } } public string Content { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Elements { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Elements { get { throw null; } } public System.Collections.Generic.IReadOnlyList Spans { get { throw null; } } } public partial class DocumentFormula @@ -530,7 +509,7 @@ public partial class DocumentListItem internal DocumentListItem() { } public System.Collections.Generic.IReadOnlyList BoundingRegions { get { throw null; } } public string Content { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Elements { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Elements { get { throw null; } } public int Level { get { throw null; } } public System.Collections.Generic.IReadOnlyList Spans { get { throw null; } } } @@ -539,6 +518,8 @@ public partial class DocumentModelAdministrationClient protected DocumentModelAdministrationClient() { } public DocumentModelAdministrationClient(System.Uri endpoint, Azure.AzureKeyCredential credential) { } public DocumentModelAdministrationClient(System.Uri endpoint, Azure.AzureKeyCredential credential, Azure.AI.DocumentIntelligence.AzureAIDocumentIntelligenceClientOptions options) { } + public DocumentModelAdministrationClient(System.Uri endpoint, Azure.Core.TokenCredential credential) { } + public DocumentModelAdministrationClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.AI.DocumentIntelligence.AzureAIDocumentIntelligenceClientOptions options) { } public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } public virtual Azure.Response AuthorizeModelCopy(Azure.AI.DocumentIntelligence.AuthorizeCopyRequest authorizeCopyRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response AuthorizeModelCopy(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } @@ -548,10 +529,10 @@ public DocumentModelAdministrationClient(System.Uri endpoint, Azure.AzureKeyCred public virtual Azure.Operation BuildClassifier(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task> BuildClassifierAsync(Azure.WaitUntil waitUntil, Azure.AI.DocumentIntelligence.BuildDocumentClassifierRequest buildRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> BuildClassifierAsync(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Operation BuildDocument(Azure.WaitUntil waitUntil, Azure.AI.DocumentIntelligence.BuildDocumentModelRequest buildRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Operation BuildDocument(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> BuildDocumentAsync(Azure.WaitUntil waitUntil, Azure.AI.DocumentIntelligence.BuildDocumentModelRequest buildRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> BuildDocumentAsync(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation BuildDocumentModel(Azure.WaitUntil waitUntil, Azure.AI.DocumentIntelligence.BuildDocumentModelRequest buildRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation BuildDocumentModel(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> BuildDocumentModelAsync(Azure.WaitUntil waitUntil, Azure.AI.DocumentIntelligence.BuildDocumentModelRequest buildRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> BuildDocumentModelAsync(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual Azure.Operation ComposeModel(Azure.WaitUntil waitUntil, Azure.AI.DocumentIntelligence.ComposeDocumentModelRequest composeRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Operation ComposeModel(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task> ComposeModelAsync(Azure.WaitUntil waitUntil, Azure.AI.DocumentIntelligence.ComposeDocumentModelRequest composeRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -577,17 +558,17 @@ public DocumentModelAdministrationClient(System.Uri endpoint, Azure.AzureKeyCred public virtual System.Threading.Tasks.Task GetModelAsync(string modelId, Azure.RequestContext context) { throw null; } public virtual System.Threading.Tasks.Task> GetModelAsync(string modelId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetModels(Azure.RequestContext context) { throw null; } - public virtual Azure.Pageable GetModels(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetModels(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetModelsAsync(Azure.RequestContext context) { throw null; } - public virtual Azure.AsyncPageable GetModelsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetModelsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetOperation(System.Guid operationId, Azure.RequestContext context) { throw null; } public virtual Azure.Response GetOperation(System.Guid operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task GetOperationAsync(System.Guid operationId, Azure.RequestContext context) { throw null; } public virtual System.Threading.Tasks.Task> GetOperationAsync(System.Guid operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetOperations(Azure.RequestContext context) { throw null; } - public virtual Azure.Pageable GetOperations(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetOperations(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetOperationsAsync(Azure.RequestContext context) { throw null; } - public virtual Azure.AsyncPageable GetOperationsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetOperationsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetResourceInfo(Azure.RequestContext context) { throw null; } public virtual Azure.Response GetResourceInfo(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task GetResourceInfoAsync(Azure.RequestContext context) { throw null; } @@ -595,33 +576,29 @@ public DocumentModelAdministrationClient(System.Uri endpoint, Azure.AzureKeyCred } public partial class DocumentModelBuildOperationDetails : Azure.AI.DocumentIntelligence.OperationDetails { - internal DocumentModelBuildOperationDetails() : base (default(Azure.AI.DocumentIntelligence.OperationStatus), default(System.DateTimeOffset), default(System.DateTimeOffset), default(System.Uri)) { } + internal DocumentModelBuildOperationDetails() : base (default(System.Guid), default(Azure.AI.DocumentIntelligence.OperationStatus), default(System.DateTimeOffset), default(System.DateTimeOffset), default(System.Uri)) { } public Azure.AI.DocumentIntelligence.DocumentModelDetails Result { get { throw null; } } } public partial class DocumentModelComposeOperationDetails : Azure.AI.DocumentIntelligence.OperationDetails { - internal DocumentModelComposeOperationDetails() : base (default(Azure.AI.DocumentIntelligence.OperationStatus), default(System.DateTimeOffset), default(System.DateTimeOffset), default(System.Uri)) { } + internal DocumentModelComposeOperationDetails() : base (default(System.Guid), default(Azure.AI.DocumentIntelligence.OperationStatus), default(System.DateTimeOffset), default(System.DateTimeOffset), default(System.Uri)) { } public Azure.AI.DocumentIntelligence.DocumentModelDetails Result { get { throw null; } } } public partial class DocumentModelCopyToOperationDetails : Azure.AI.DocumentIntelligence.OperationDetails { - internal DocumentModelCopyToOperationDetails() : base (default(Azure.AI.DocumentIntelligence.OperationStatus), default(System.DateTimeOffset), default(System.DateTimeOffset), default(System.Uri)) { } + internal DocumentModelCopyToOperationDetails() : base (default(System.Guid), default(Azure.AI.DocumentIntelligence.OperationStatus), default(System.DateTimeOffset), default(System.DateTimeOffset), default(System.Uri)) { } public Azure.AI.DocumentIntelligence.DocumentModelDetails Result { get { throw null; } } } - public partial class DocumentModelDetails : Azure.AI.DocumentIntelligence.DocumentModelSummary + public partial class DocumentModelDetails { internal DocumentModelDetails() { } + public string ApiVersion { get { throw null; } } public Azure.AI.DocumentIntelligence.AzureBlobFileListContentSource AzureBlobFileListSource { get { throw null; } } public Azure.AI.DocumentIntelligence.AzureBlobContentSource AzureBlobSource { get { throw null; } } - public Azure.AI.DocumentIntelligence.DocumentBuildMode BuildMode { get { throw null; } } - public System.Collections.Generic.IReadOnlyDictionary DocTypes { get { throw null; } } - } - public partial class DocumentModelSummary - { - internal DocumentModelSummary() { } - public string ApiVersion { get { throw null; } } + public Azure.AI.DocumentIntelligence.DocumentBuildMode? BuildMode { get { throw null; } } public System.DateTimeOffset CreatedDateTime { get { throw null; } } public string Description { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary DocTypes { get { throw null; } } public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } public string ModelId { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } } @@ -652,7 +629,7 @@ internal DocumentParagraph() { } public partial class DocumentSection { internal DocumentSection() { } - public System.Collections.Generic.IReadOnlyList Elements { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Elements { get { throw null; } } public System.Collections.Generic.IReadOnlyList Spans { get { throw null; } } } public partial class DocumentSelectionMark @@ -735,7 +712,7 @@ internal DocumentTableCell() { } public int ColumnIndex { get { throw null; } } public int? ColumnSpan { get { throw null; } } public string Content { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Elements { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Elements { get { throw null; } } public Azure.AI.DocumentIntelligence.DocumentTableCellKind? Kind { get { throw null; } } public int RowIndex { get { throw null; } } public int? RowSpan { get { throw null; } } @@ -818,7 +795,7 @@ public partial class InnerError { internal InnerError() { } public string Code { get { throw null; } } - public Azure.AI.DocumentIntelligence.InnerError Innererror { get { throw null; } } + public Azure.AI.DocumentIntelligence.InnerError InnerErrorObject { get { throw null; } } public string Message { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -841,7 +818,7 @@ internal InnerError() { } } public abstract partial class OperationDetails { - protected OperationDetails(Azure.AI.DocumentIntelligence.OperationStatus status, System.DateTimeOffset createdDateTime, System.DateTimeOffset lastUpdatedDateTime, System.Uri resourceLocation) { } + protected OperationDetails(System.Guid operationId, Azure.AI.DocumentIntelligence.OperationStatus status, System.DateTimeOffset createdDateTime, System.DateTimeOffset lastUpdatedDateTime, System.Uri resourceLocation) { } public string ApiVersion { get { throw null; } } public System.DateTimeOffset CreatedDateTime { get { throw null; } } public Azure.AI.DocumentIntelligence.DocumentIntelligenceError Error { get { throw null; } } @@ -853,27 +830,6 @@ protected OperationDetails(Azure.AI.DocumentIntelligence.OperationStatus status, public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct OperationKind : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public OperationKind(string value) { throw null; } - public static Azure.AI.DocumentIntelligence.OperationKind ChatBuild { get { throw null; } } - public static Azure.AI.DocumentIntelligence.OperationKind DocumentClassifierBuild { get { throw null; } } - public static Azure.AI.DocumentIntelligence.OperationKind DocumentModelBuild { get { throw null; } } - public static Azure.AI.DocumentIntelligence.OperationKind DocumentModelCompose { get { throw null; } } - public static Azure.AI.DocumentIntelligence.OperationKind DocumentModelCopyTo { get { throw null; } } - public bool Equals(Azure.AI.DocumentIntelligence.OperationKind other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.AI.DocumentIntelligence.OperationKind left, Azure.AI.DocumentIntelligence.OperationKind right) { throw null; } - public static implicit operator Azure.AI.DocumentIntelligence.OperationKind (string value) { throw null; } - public static bool operator !=(Azure.AI.DocumentIntelligence.OperationKind left, Azure.AI.DocumentIntelligence.OperationKind right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct OperationStatus : System.IEquatable { private readonly object _dummy; @@ -894,19 +850,6 @@ protected OperationDetails(Azure.AI.DocumentIntelligence.OperationStatus status, public static bool operator !=(Azure.AI.DocumentIntelligence.OperationStatus left, Azure.AI.DocumentIntelligence.OperationStatus right) { throw null; } public override string ToString() { throw null; } } - public partial class OperationSummary - { - internal OperationSummary() { } - public string ApiVersion { get { throw null; } } - public System.DateTimeOffset CreatedDateTime { get { throw null; } } - public Azure.AI.DocumentIntelligence.OperationKind Kind { get { throw null; } } - public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } - public System.Guid OperationId { get { throw null; } } - public int? PercentCompleted { get { throw null; } } - public System.Uri ResourceLocation { get { throw null; } } - public Azure.AI.DocumentIntelligence.OperationStatus Status { get { throw null; } } - public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ParagraphRole : System.IEquatable { @@ -986,8 +929,10 @@ namespace Microsoft.Extensions.Azure { public static partial class AIDocumentIntelligenceClientBuilderExtensions { + public static Azure.Core.Extensions.IAzureClientBuilder AddDocumentAnalysisClient(this TBuilder builder, System.Uri endpoint) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddDocumentAnalysisClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddDocumentAnalysisClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddDocumentModelAdministrationClient(this TBuilder builder, System.Uri endpoint) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddDocumentModelAdministrationClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddDocumentModelAdministrationClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } } diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/assets.json b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/assets.json new file mode 100644 index 000000000000..f723b071ebfa --- /dev/null +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/documentintelligence/Azure.AI.DocumentIntelligence", + "Tag": "net/documentintelligence/Azure.AI.DocumentIntelligence_f6b061e70f" +} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/DocumentModelDetails.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/DocumentModelDetails.Serialization.cs index af4316336885..73668f2cde96 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/DocumentModelDetails.Serialization.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/DocumentModelDetails.Serialization.cs @@ -7,7 +7,7 @@ public partial class DocumentModelDetails { /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new DocumentModelDetails FromResponse(Response response) + internal static DocumentModelDetails FromResponse(Response response) { return DeserializationHelpers.FromOperationResponse(response, DeserializeDocumentModelDetails, "result"); } diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AIDocumentIntelligenceClientBuilderExtensions.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AIDocumentIntelligenceClientBuilderExtensions.cs index e96573066650..da4454841db7 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AIDocumentIntelligenceClientBuilderExtensions.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AIDocumentIntelligenceClientBuilderExtensions.cs @@ -25,6 +25,15 @@ public static IAzureClientBuilder((options) => new DocumentAnalysisClient(endpoint, credential, options)); } + /// Registers a instance. + /// The builder to register with. + /// The Document Intelligence service endpoint. + public static IAzureClientBuilder AddDocumentAnalysisClient(this TBuilder builder, Uri endpoint) + where TBuilder : IAzureClientFactoryBuilderWithCredential + { + return builder.RegisterClientFactory((options, cred) => new DocumentAnalysisClient(endpoint, cred, options)); + } + /// Registers a instance. /// The builder to register with. /// The Document Intelligence service endpoint. @@ -35,6 +44,15 @@ public static IAzureClientBuilder((options) => new DocumentModelAdministrationClient(endpoint, credential, options)); } + /// Registers a instance. + /// The builder to register with. + /// The Document Intelligence service endpoint. + public static IAzureClientBuilder AddDocumentModelAdministrationClient(this TBuilder builder, Uri endpoint) + where TBuilder : IAzureClientFactoryBuilderWithCredential + { + return builder.RegisterClientFactory((options, cred) => new DocumentModelAdministrationClient(endpoint, cred, options)); + } + /// Registers a instance. /// The builder to register with. /// The configuration values. diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AIDocumentIntelligenceModelFactory.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AIDocumentIntelligenceModelFactory.cs index bb71a5d7c0f0..b67ed9604540 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AIDocumentIntelligenceModelFactory.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AIDocumentIntelligenceModelFactory.cs @@ -245,11 +245,11 @@ public static DocumentTable DocumentTable(int rowCount = default, int columnCoun /// Location of the table cell in the reading order concatenated content. /// Child elements of the table cell. /// A new instance for mocking. - public static DocumentTableCell DocumentTableCell(DocumentTableCellKind? kind = null, int rowIndex = default, int columnIndex = default, int? rowSpan = null, int? columnSpan = null, string content = null, IEnumerable boundingRegions = null, IEnumerable spans = null, IEnumerable elements = null) + public static DocumentTableCell DocumentTableCell(DocumentTableCellKind? kind = null, int rowIndex = default, int columnIndex = default, int? rowSpan = null, int? columnSpan = null, string content = null, IEnumerable boundingRegions = null, IEnumerable spans = null, IEnumerable elements = null) { boundingRegions ??= new List(); spans ??= new List(); - elements ??= new List(); + elements ??= new List(); return new DocumentTableCell(kind, rowIndex, columnIndex, rowSpan, columnSpan, content, boundingRegions?.ToList(), spans?.ToList(), elements?.ToList()); } @@ -260,11 +260,11 @@ public static DocumentTableCell DocumentTableCell(DocumentTableCellKind? kind = /// Location of the caption in the reading order concatenated content. /// Child elements of the caption. /// A new instance for mocking. - public static DocumentCaption DocumentCaption(string content = null, IEnumerable boundingRegions = null, IEnumerable spans = null, IEnumerable elements = null) + public static DocumentCaption DocumentCaption(string content = null, IEnumerable boundingRegions = null, IEnumerable spans = null, IEnumerable elements = null) { boundingRegions ??= new List(); spans ??= new List(); - elements ??= new List(); + elements ??= new List(); return new DocumentCaption(content, boundingRegions?.ToList(), spans?.ToList(), elements?.ToList()); } @@ -275,11 +275,11 @@ public static DocumentCaption DocumentCaption(string content = null, IEnumerable /// Location of the footnote in the reading order concatenated content. /// Child elements of the footnote. /// A new instance for mocking. - public static DocumentFootnote DocumentFootnote(string content = null, IEnumerable boundingRegions = null, IEnumerable spans = null, IEnumerable elements = null) + public static DocumentFootnote DocumentFootnote(string content = null, IEnumerable boundingRegions = null, IEnumerable spans = null, IEnumerable elements = null) { boundingRegions ??= new List(); spans ??= new List(); - elements ??= new List(); + elements ??= new List(); return new DocumentFootnote(content, boundingRegions?.ToList(), spans?.ToList(), elements?.ToList()); } @@ -291,11 +291,11 @@ public static DocumentFootnote DocumentFootnote(string content = null, IEnumerab /// Caption associated with the figure. /// List of footnotes associated with the figure. /// A new instance for mocking. - public static DocumentFigure DocumentFigure(IEnumerable boundingRegions = null, IEnumerable spans = null, IEnumerable elements = null, DocumentCaption caption = null, IEnumerable footnotes = null) + public static DocumentFigure DocumentFigure(IEnumerable boundingRegions = null, IEnumerable spans = null, IEnumerable elements = null, DocumentCaption caption = null, IEnumerable footnotes = null) { boundingRegions ??= new List(); spans ??= new List(); - elements ??= new List(); + elements ??= new List(); footnotes ??= new List(); return new DocumentFigure(boundingRegions?.ToList(), spans?.ToList(), elements?.ToList(), caption, footnotes?.ToList()); @@ -320,11 +320,11 @@ public static DocumentList DocumentList(IEnumerable spans = null, /// Location of the list item in the reading order concatenated content. /// Child elements of the list item. /// A new instance for mocking. - public static DocumentListItem DocumentListItem(int level = default, string content = null, IEnumerable boundingRegions = null, IEnumerable spans = null, IEnumerable elements = null) + public static DocumentListItem DocumentListItem(int level = default, string content = null, IEnumerable boundingRegions = null, IEnumerable spans = null, IEnumerable elements = null) { boundingRegions ??= new List(); spans ??= new List(); - elements ??= new List(); + elements ??= new List(); return new DocumentListItem(level, content, boundingRegions?.ToList(), spans?.ToList(), elements?.ToList()); } @@ -333,10 +333,10 @@ public static DocumentListItem DocumentListItem(int level = default, string cont /// Location of the section in the reading order concatenated content. /// Child elements of the section. /// A new instance for mocking. - public static DocumentSection DocumentSection(IEnumerable spans = null, IEnumerable elements = null) + public static DocumentSection DocumentSection(IEnumerable spans = null, IEnumerable elements = null) { spans ??= new List(); - elements ??= new List(); + elements ??= new List(); return new DocumentSection(spans?.ToList(), elements?.ToList()); } @@ -483,21 +483,6 @@ public static AddressValue AddressValue(string houseNumber = null, string poBox return new AddressValue(houseNumber, poBox, road, city, state, postalCode, countryRegion, streetAddress, unit, cityDistrict, stateDistrict, suburb, house, level); } - /// Initializes a new instance of DocumentModelSummary. - /// Unique document model name. - /// Document model description. - /// Date and time (UTC) when the document model was created. - /// Date and time (UTC) when the document model will expire. - /// API version used to create this document model. - /// List of key-value tag attributes associated with the document model. - /// A new instance for mocking. - public static DocumentModelSummary DocumentModelSummary(string modelId = null, string description = null, DateTimeOffset createdDateTime = default, DateTimeOffset? expirationDateTime = null, string apiVersion = null, IReadOnlyDictionary tags = null) - { - tags ??= new Dictionary(); - - return new DocumentModelSummary(modelId, description, createdDateTime, expirationDateTime, apiVersion, tags); - } - /// Initializes a new instance of DocumentModelDetails. /// Unique document model name. /// Document model description. @@ -516,7 +501,7 @@ public static DocumentModelSummary DocumentModelSummary(string modelId = null, s /// /// Supported document types. /// A new instance for mocking. - public static DocumentModelDetails DocumentModelDetails(string modelId = null, string description = null, DateTimeOffset createdDateTime = default, DateTimeOffset? expirationDateTime = null, string apiVersion = null, IReadOnlyDictionary tags = null, DocumentBuildMode buildMode = default, AzureBlobContentSource azureBlobSource = null, AzureBlobFileListContentSource azureBlobFileListSource = null, IReadOnlyDictionary docTypes = null) + public static DocumentModelDetails DocumentModelDetails(string modelId = null, string description = null, DateTimeOffset createdDateTime = default, DateTimeOffset? expirationDateTime = null, string apiVersion = null, IReadOnlyDictionary tags = null, DocumentBuildMode? buildMode = null, AzureBlobContentSource azureBlobSource = null, AzureBlobFileListContentSource azureBlobFileListSource = null, IReadOnlyDictionary docTypes = null) { tags ??= new Dictionary(); docTypes ??= new Dictionary(); @@ -610,11 +595,11 @@ public static OperationDetails OperationDetails(Guid operationId = default, Oper } /// Initializes a new instance of DocumentIntelligenceError. - /// Error code. - /// Error message. - /// Target of the error. - /// List of detailed errors. - /// Detailed error. + /// One of a server-defined set of error codes. + /// A human-readable representation of the error. + /// The target of the error. + /// An array of details about specific errors that led to this reported error. + /// An object containing more specific information than the current object about the error. /// A new instance for mocking. public static DocumentIntelligenceError DocumentIntelligenceError(string code = null, string message = null, string target = null, IEnumerable details = null, InnerError innererror = null) { @@ -624,13 +609,13 @@ public static DocumentIntelligenceError DocumentIntelligenceError(string code = } /// Initializes a new instance of InnerError. - /// Error code. - /// Error message. - /// Detailed error. + /// One of a server-defined set of error codes. + /// A human-readable representation of the error. + /// Inner error. /// A new instance for mocking. - public static InnerError InnerError(string code = null, string message = null, InnerError innererror = null) + public static InnerError InnerError(string code = null, string message = null, InnerError innerErrorObject = null) { - return new InnerError(code, message, innererror); + return new InnerError(code, message, innerErrorObject); } /// Initializes a new instance of DocumentModelBuildOperationDetails. @@ -723,63 +708,5 @@ public static DocumentClassifierDetails DocumentClassifierDetails(string classif return new DocumentClassifierDetails(classifierId, description, createdDateTime, expirationDateTime, apiVersion, docTypes); } - - /// Initializes a new instance of ChatIndexBuildOperationDetails. - /// Operation ID. - /// Operation status. - /// Operation progress (0-100). - /// Date and time (UTC) when the operation was created. - /// Date and time (UTC) when the status was last updated. - /// URL of the resource targeted by this operation. - /// API version used to create this operation. - /// List of key-value tag attributes associated with the document model. - /// Encountered error. - /// Operation result upon success. - /// A new instance for mocking. - public static ChatIndexBuildOperationDetails ChatIndexBuildOperationDetails(Guid operationId = default, OperationStatus status = default, int? percentCompleted = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, Uri resourceLocation = null, string apiVersion = null, IReadOnlyDictionary tags = null, DocumentIntelligenceError error = null, ChatIndexDetails result = null) - { - tags ??= new Dictionary(); - - return new ChatIndexBuildOperationDetails(operationId, status, percentCompleted, createdDateTime, lastUpdatedDateTime, OperationKind.ChatBuild, resourceLocation, apiVersion, tags, error, result); - } - - /// Initializes a new instance of ChatIndexDetails. - /// Chat index ID. - /// Date and time (UTC) when the index was created. - /// Date and time (UTC) when the index will expire. - /// API version used to create this index. - /// or is null. - /// A new instance for mocking. - public static ChatIndexDetails ChatIndexDetails(string chatId = null, DateTimeOffset createdDateTime = default, DateTimeOffset expirationDateTime = default, string apiVersion = null) - { - if (chatId == null) - { - throw new ArgumentNullException(nameof(chatId)); - } - if (apiVersion == null) - { - throw new ArgumentNullException(nameof(apiVersion)); - } - - return new ChatIndexDetails(chatId, createdDateTime, expirationDateTime, apiVersion); - } - - /// Initializes a new instance of OperationSummary. - /// Operation ID. - /// Operation status. - /// Operation progress (0-100). - /// Date and time (UTC) when the operation was created. - /// Date and time (UTC) when the status was last updated. - /// Type of operation. - /// URL of the resource targeted by this operation. - /// API version used to create this operation. - /// List of key-value tag attributes associated with the document model. - /// A new instance for mocking. - public static OperationSummary OperationSummary(Guid operationId = default, OperationStatus status = default, int? percentCompleted = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, OperationKind kind = default, Uri resourceLocation = null, string apiVersion = null, IReadOnlyDictionary tags = null) - { - tags ??= new Dictionary(); - - return new OperationSummary(operationId, status, percentCompleted, createdDateTime, lastUpdatedDateTime, kind, resourceLocation, apiVersion, tags); - } } } diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AzureAIDocumentIntelligenceClientOptions.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AzureAIDocumentIntelligenceClientOptions.cs index ae5d4d3636be..85b93e9d46bf 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AzureAIDocumentIntelligenceClientOptions.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/AzureAIDocumentIntelligenceClientOptions.cs @@ -18,12 +18,8 @@ public partial class AzureAIDocumentIntelligenceClientOptions : ClientOptions /// The version of the service to use. public enum ServiceVersion { - /// Service version "2022-08-31". - V2022_08_31 = 1, - /// Service version "2023-07-31". - V2023_07_31 = 2, /// Service version "2023-10-31-preview". - V2023_10_31_Preview = 3, + V2023_10_31_Preview = 1, } internal string Version { get; } @@ -33,8 +29,6 @@ public AzureAIDocumentIntelligenceClientOptions(ServiceVersion version = LatestV { Version = version switch { - ServiceVersion.V2022_08_31 => "2022-08-31", - ServiceVersion.V2023_07_31 => "2023-07-31", ServiceVersion.V2023_10_31_Preview => "2023-10-31-preview", _ => throw new NotSupportedException() }; diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexBuildOperationDetails.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexBuildOperationDetails.Serialization.cs deleted file mode 100644 index 944e58948351..000000000000 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexBuildOperationDetails.Serialization.cs +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using Azure; -using Azure.Core; - -namespace Azure.AI.DocumentIntelligence -{ - public partial class ChatIndexBuildOperationDetails - { - internal static ChatIndexBuildOperationDetails DeserializeChatIndexBuildOperationDetails(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional result = default; - Guid operationId = default; - OperationStatus status = default; - Optional percentCompleted = default; - DateTimeOffset createdDateTime = default; - DateTimeOffset lastUpdatedDateTime = default; - OperationKind kind = default; - Uri resourceLocation = default; - Optional apiVersion = default; - Optional> tags = default; - Optional error = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("result"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - result = ChatIndexDetails.DeserializeChatIndexDetails(property.Value); - continue; - } - if (property.NameEquals("operationId"u8)) - { - operationId = property.Value.GetGuid(); - continue; - } - if (property.NameEquals("status"u8)) - { - status = new OperationStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("percentCompleted"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - percentCompleted = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("createdDateTime"u8)) - { - createdDateTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("lastUpdatedDateTime"u8)) - { - lastUpdatedDateTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new OperationKind(property.Value.GetString()); - continue; - } - if (property.NameEquals("resourceLocation"u8)) - { - resourceLocation = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("apiVersion"u8)) - { - apiVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("error"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - error = DocumentIntelligenceError.DeserializeDocumentIntelligenceError(property.Value); - continue; - } - } - return new ChatIndexBuildOperationDetails(operationId, status, Optional.ToNullable(percentCompleted), createdDateTime, lastUpdatedDateTime, kind, resourceLocation, apiVersion.Value, Optional.ToDictionary(tags), error.Value, result.Value); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new ChatIndexBuildOperationDetails FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeChatIndexBuildOperationDetails(document.RootElement); - } - } -} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexBuildOperationDetails.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexBuildOperationDetails.cs deleted file mode 100644 index 709e818e6678..000000000000 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexBuildOperationDetails.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.AI.DocumentIntelligence -{ - /// Get Operation response object. - public partial class ChatIndexBuildOperationDetails : OperationDetails - { - /// Initializes a new instance of ChatIndexBuildOperationDetails. - /// Operation status. - /// Date and time (UTC) when the operation was created. - /// Date and time (UTC) when the status was last updated. - /// URL of the resource targeted by this operation. - /// is null. - internal ChatIndexBuildOperationDetails(OperationStatus status, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, Uri resourceLocation) : base(status, createdDateTime, lastUpdatedDateTime, resourceLocation) - { - Argument.AssertNotNull(resourceLocation, nameof(resourceLocation)); - - Kind = OperationKind.ChatBuild; - } - - /// Initializes a new instance of ChatIndexBuildOperationDetails. - /// Operation ID. - /// Operation status. - /// Operation progress (0-100). - /// Date and time (UTC) when the operation was created. - /// Date and time (UTC) when the status was last updated. - /// Type of operation. - /// URL of the resource targeted by this operation. - /// API version used to create this operation. - /// List of key-value tag attributes associated with the document model. - /// Encountered error. - /// Operation result upon success. - internal ChatIndexBuildOperationDetails(Guid operationId, OperationStatus status, int? percentCompleted, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, OperationKind kind, Uri resourceLocation, string apiVersion, IReadOnlyDictionary tags, DocumentIntelligenceError error, ChatIndexDetails result) : base(operationId, status, percentCompleted, createdDateTime, lastUpdatedDateTime, kind, resourceLocation, apiVersion, tags, error) - { - Result = result; - } - - /// Operation result upon success. - public ChatIndexDetails Result { get; } - } -} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexDetails.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexDetails.Serialization.cs deleted file mode 100644 index 289c6b61164f..000000000000 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexDetails.Serialization.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure; -using Azure.Core; - -namespace Azure.AI.DocumentIntelligence -{ - public partial class ChatIndexDetails - { - internal static ChatIndexDetails DeserializeChatIndexDetails(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string chatId = default; - DateTimeOffset createdDateTime = default; - DateTimeOffset expirationDateTime = default; - string apiVersion = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("chatId"u8)) - { - chatId = property.Value.GetString(); - continue; - } - if (property.NameEquals("createdDateTime"u8)) - { - createdDateTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("expirationDateTime"u8)) - { - expirationDateTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("apiVersion"u8)) - { - apiVersion = property.Value.GetString(); - continue; - } - } - return new ChatIndexDetails(chatId, createdDateTime, expirationDateTime, apiVersion); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static ChatIndexDetails FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeChatIndexDetails(document.RootElement); - } - } -} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexDetails.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexDetails.cs deleted file mode 100644 index 25556d2ecbc3..000000000000 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexDetails.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.AI.DocumentIntelligence -{ - /// Detailed chat index info. - public partial class ChatIndexDetails : ChatIndexSummary - { - /// Initializes a new instance of ChatIndexDetails. - /// Chat index ID. - /// Date and time (UTC) when the index was created. - /// Date and time (UTC) when the index will expire. - /// API version used to create this index. - /// or is null. - internal ChatIndexDetails(string chatId, DateTimeOffset createdDateTime, DateTimeOffset expirationDateTime, string apiVersion) : base(chatId, createdDateTime, expirationDateTime, apiVersion) - { - Argument.AssertNotNull(chatId, nameof(chatId)); - Argument.AssertNotNull(apiVersion, nameof(apiVersion)); - } - } -} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexSummary.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexSummary.cs deleted file mode 100644 index 663c1a5ddd31..000000000000 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/ChatIndexSummary.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.AI.DocumentIntelligence -{ - /// Chat index info. - public partial class ChatIndexSummary - { - /// Initializes a new instance of ChatIndexSummary. - /// Chat index ID. - /// Date and time (UTC) when the index was created. - /// Date and time (UTC) when the index will expire. - /// API version used to create this index. - /// or is null. - internal ChatIndexSummary(string chatId, DateTimeOffset createdDateTime, DateTimeOffset expirationDateTime, string apiVersion) - { - Argument.AssertNotNull(chatId, nameof(chatId)); - Argument.AssertNotNull(apiVersion, nameof(apiVersion)); - - ChatId = chatId; - CreatedDateTime = createdDateTime; - ExpirationDateTime = expirationDateTime; - ApiVersion = apiVersion; - } - - /// Chat index ID. - public string ChatId { get; } - /// Date and time (UTC) when the index was created. - public DateTimeOffset CreatedDateTime { get; } - /// Date and time (UTC) when the index will expire. - public DateTimeOffset ExpirationDateTime { get; } - /// API version used to create this index. - public string ApiVersion { get; } - } -} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/Docs/DocumentModelAdministrationClient.xml b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/Docs/DocumentModelAdministrationClient.xml index 4f1b593fe761..27718aeb4c58 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/Docs/DocumentModelAdministrationClient.xml +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/Docs/DocumentModelAdministrationClient.xml @@ -202,7 +202,6 @@ DocumentModelAdministrationClient client = new DocumentModelAdministrationClient Response response = await client.GetModelAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("buildMode").ToString()); Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); ]]> @@ -215,6 +214,12 @@ DocumentModelAdministrationClient client = new DocumentModelAdministrationClient Response response = await client.GetModelAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("buildMode").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); @@ -229,12 +234,6 @@ Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetPropert Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); -Console.WriteLine(result.GetProperty("apiVersion").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); ]]> @@ -248,7 +247,6 @@ DocumentModelAdministrationClient client = new DocumentModelAdministrationClient Response response = client.GetModel("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("buildMode").ToString()); Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); ]]> @@ -261,6 +259,12 @@ DocumentModelAdministrationClient client = new DocumentModelAdministrationClient Response response = client.GetModel("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("buildMode").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); @@ -275,12 +279,6 @@ Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetPropert Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); -Console.WriteLine(result.GetProperty("apiVersion").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); ]]> @@ -723,7 +721,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); -await foreach (DocumentModelSummary item in client.GetModelsAsync()) +await foreach (DocumentModelDetails item in client.GetModelsAsync()) { } ]]> @@ -733,7 +731,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); -await foreach (DocumentModelSummary item in client.GetModelsAsync()) +await foreach (DocumentModelDetails item in client.GetModelsAsync()) { } ]]> @@ -746,7 +744,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); -foreach (DocumentModelSummary item in client.GetModels()) +foreach (DocumentModelDetails item in client.GetModels()) { } ]]> @@ -756,7 +754,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); -foreach (DocumentModelSummary item in client.GetModels()) +foreach (DocumentModelDetails item in client.GetModels()) { } ]]> @@ -791,6 +789,20 @@ await foreach (BinaryData item in client.GetModelsAsync(null)) Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); Console.WriteLine(result.GetProperty("apiVersion").ToString()); Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); + Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); } ]]> @@ -824,6 +836,20 @@ foreach (BinaryData item in client.GetModels(null)) Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); Console.WriteLine(result.GetProperty("apiVersion").ToString()); Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); + Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); } ]]> @@ -835,7 +861,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); -await foreach (OperationSummary item in client.GetOperationsAsync()) +await foreach (OperationDetails item in client.GetOperationsAsync()) { } ]]> @@ -845,7 +871,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); -await foreach (OperationSummary item in client.GetOperationsAsync()) +await foreach (OperationDetails item in client.GetOperationsAsync()) { } ]]> @@ -858,7 +884,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); -foreach (OperationSummary item in client.GetOperations()) +foreach (OperationDetails item in client.GetOperations()) { } ]]> @@ -868,7 +894,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); -foreach (OperationSummary item in client.GetOperations()) +foreach (OperationDetails item in client.GetOperations()) { } ]]> @@ -910,6 +936,11 @@ await foreach (BinaryData item in client.GetOperationsAsync(null)) Console.WriteLine(result.GetProperty("resourceLocation").ToString()); Console.WriteLine(result.GetProperty("apiVersion").ToString()); Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); } ]]> @@ -950,6 +981,11 @@ foreach (BinaryData item in client.GetOperations(null)) Console.WriteLine(result.GetProperty("resourceLocation").ToString()); Console.WriteLine(result.GetProperty("apiVersion").ToString()); Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); } ]]> @@ -1077,19 +1113,19 @@ foreach (BinaryData item in client.GetClassifiers(null)) } ]]> - + -This sample shows how to call BuildDocumentAsync. +This sample shows how to call BuildDocumentModelAsync. "); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); BuildDocumentModelRequest buildRequest = new BuildDocumentModelRequest("", DocumentBuildMode.Template); -Operation operation = await client.BuildDocumentAsync(WaitUntil.Completed, buildRequest); +Operation operation = await client.BuildDocumentModelAsync(WaitUntil.Completed, buildRequest); DocumentModelDetails responseData = operation.Value; ]]> -This sample shows how to call BuildDocumentAsync with all parameters. +This sample shows how to call BuildDocumentModelAsync with all parameters. "); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -1108,23 +1144,23 @@ BuildDocumentModelRequest buildRequest = new BuildDocumentModelRequest(" operation = await client.BuildDocumentAsync(WaitUntil.Completed, buildRequest); +Operation operation = await client.BuildDocumentModelAsync(WaitUntil.Completed, buildRequest); DocumentModelDetails responseData = operation.Value; ]]> - + -This sample shows how to call BuildDocument. +This sample shows how to call BuildDocumentModel. "); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); BuildDocumentModelRequest buildRequest = new BuildDocumentModelRequest("", DocumentBuildMode.Template); -Operation operation = client.BuildDocument(WaitUntil.Completed, buildRequest); +Operation operation = client.BuildDocumentModel(WaitUntil.Completed, buildRequest); DocumentModelDetails responseData = operation.Value; ]]> -This sample shows how to call BuildDocument with all parameters. +This sample shows how to call BuildDocumentModel with all parameters. "); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -1143,13 +1179,13 @@ BuildDocumentModelRequest buildRequest = new BuildDocumentModelRequest(" operation = client.BuildDocument(WaitUntil.Completed, buildRequest); +Operation operation = client.BuildDocumentModel(WaitUntil.Completed, buildRequest); DocumentModelDetails responseData = operation.Value; ]]> - + -This sample shows how to call BuildDocumentAsync and parse the result. +This sample shows how to call BuildDocumentModelAsync and parse the result. "); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -1160,15 +1196,14 @@ using RequestContent content = RequestContent.Create(new modelId = "", buildMode = "template", }); -Operation operation = await client.BuildDocumentAsync(WaitUntil.Completed, content); +Operation operation = await client.BuildDocumentModelAsync(WaitUntil.Completed, content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("buildMode").ToString()); Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); ]]> -This sample shows how to call BuildDocumentAsync with all parameters and request content and parse the result. +This sample shows how to call BuildDocumentModelAsync with all parameters and request content and parse the result. "); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -1194,10 +1229,16 @@ using RequestContent content = RequestContent.Create(new key = "", }, }); -Operation operation = await client.BuildDocumentAsync(WaitUntil.Completed, content); +Operation operation = await client.BuildDocumentModelAsync(WaitUntil.Completed, content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("buildMode").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); @@ -1212,17 +1253,11 @@ Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetPropert Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); -Console.WriteLine(result.GetProperty("apiVersion").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); ]]> - + -This sample shows how to call BuildDocument and parse the result. +This sample shows how to call BuildDocumentModel and parse the result. "); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -1233,15 +1268,14 @@ using RequestContent content = RequestContent.Create(new modelId = "", buildMode = "template", }); -Operation operation = client.BuildDocument(WaitUntil.Completed, content); +Operation operation = client.BuildDocumentModel(WaitUntil.Completed, content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("buildMode").ToString()); Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); ]]> -This sample shows how to call BuildDocument with all parameters and request content and parse the result. +This sample shows how to call BuildDocumentModel with all parameters and request content and parse the result. "); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -1267,10 +1301,16 @@ using RequestContent content = RequestContent.Create(new key = "", }, }); -Operation operation = client.BuildDocument(WaitUntil.Completed, content); +Operation operation = client.BuildDocumentModel(WaitUntil.Completed, content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("buildMode").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); @@ -1285,12 +1325,6 @@ Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetPropert Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); -Console.WriteLine(result.GetProperty("apiVersion").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); ]]> @@ -1388,7 +1422,6 @@ Operation operation = await client.ComposeModelAsync(WaitUntil.Compl BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("buildMode").ToString()); Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); ]]> @@ -1418,6 +1451,12 @@ Operation operation = await client.ComposeModelAsync(WaitUntil.Compl BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("buildMode").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); @@ -1432,12 +1471,6 @@ Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetPropert Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); -Console.WriteLine(result.GetProperty("apiVersion").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); ]]> @@ -1463,7 +1496,6 @@ Operation operation = client.ComposeModel(WaitUntil.Completed, conte BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("buildMode").ToString()); Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); ]]> @@ -1493,6 +1525,12 @@ Operation operation = client.ComposeModel(WaitUntil.Completed, conte BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("buildMode").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); @@ -1507,12 +1545,6 @@ Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetPropert Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); -Console.WriteLine(result.GetProperty("apiVersion").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); ]]> @@ -1582,7 +1614,6 @@ Operation operation = await client.CopyModelToAsync(WaitUntil.Comple BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("buildMode").ToString()); Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); ]]> @@ -1605,6 +1636,12 @@ Operation operation = await client.CopyModelToAsync(WaitUntil.Comple BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("apiVersion").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("buildMode").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); @@ -1619,12 +1656,6 @@ Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetPropert Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); -Console.WriteLine(result.GetProperty("apiVersion").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); ]]> @@ -1648,7 +1679,6 @@ Operation operation = client.CopyModelTo(WaitUntil.Completed, " @@ -1671,6 +1701,12 @@ Operation operation = client.CopyModelTo(WaitUntil.Completed, "").ToString()); Console.WriteLine(result.GetProperty("buildMode").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); @@ -1685,12 +1721,6 @@ Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetPropert Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); -Console.WriteLine(result.GetProperty("apiVersion").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); ]]> diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentAnalysisClient.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentAnalysisClient.cs index f080b774f643..345898891d9b 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentAnalysisClient.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentAnalysisClient.cs @@ -21,6 +21,8 @@ public partial class DocumentAnalysisClient { private const string AuthorizationHeader = "Ocp-Apim-Subscription-Key"; private readonly AzureKeyCredential _keyCredential; + private static readonly string[] AuthorizationScopes = new string[] { "https://cognitiveservices.azure.com/.default" }; + private readonly TokenCredential _tokenCredential; private readonly HttpPipeline _pipeline; private readonly Uri _endpoint; private readonly string _apiVersion; @@ -44,6 +46,14 @@ protected DocumentAnalysisClient() { } + /// Initializes a new instance of DocumentAnalysisClient. + /// The Document Intelligence service endpoint. + /// A credential used to authenticate to an Azure Service. + /// or is null. + public DocumentAnalysisClient(Uri endpoint, TokenCredential credential) : this(endpoint, credential, new AzureAIDocumentIntelligenceClientOptions()) + { + } + /// Initializes a new instance of DocumentAnalysisClient. /// The Document Intelligence service endpoint. /// A credential used to authenticate to an Azure Service. @@ -62,6 +72,24 @@ public DocumentAnalysisClient(Uri endpoint, AzureKeyCredential credential, Azure _apiVersion = options.Version; } + /// Initializes a new instance of DocumentAnalysisClient. + /// The Document Intelligence service endpoint. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + /// or is null. + public DocumentAnalysisClient(Uri endpoint, TokenCredential credential, AzureAIDocumentIntelligenceClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new AzureAIDocumentIntelligenceClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _tokenCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) }, new ResponseClassifier()); + _endpoint = endpoint; + _apiVersion = options.Version; + } + /// Analyzes document with document model. /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// Unique document model name. diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentCaption.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentCaption.Serialization.cs index 5960afa82cee..c061a2510a6d 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentCaption.Serialization.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentCaption.Serialization.cs @@ -23,7 +23,7 @@ internal static DocumentCaption DeserializeDocumentCaption(JsonElement element) string content = default; Optional> boundingRegions = default; IReadOnlyList spans = default; - Optional> elements = default; + Optional> elements = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("content"u8)) @@ -61,17 +61,10 @@ internal static DocumentCaption DeserializeDocumentCaption(JsonElement element) { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(item.GetObject()); - } + array.Add(item.GetString()); } elements = array; continue; diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentCaption.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentCaption.cs index bfb6f53e36f8..365b0a0eafec 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentCaption.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentCaption.cs @@ -27,7 +27,7 @@ internal DocumentCaption(string content, IEnumerable spans) Content = content; BoundingRegions = new ChangeTrackingList(); Spans = spans.ToList(); - Elements = new ChangeTrackingList(); + Elements = new ChangeTrackingList(); } /// Initializes a new instance of DocumentCaption. @@ -35,7 +35,7 @@ internal DocumentCaption(string content, IEnumerable spans) /// Bounding regions covering the caption. /// Location of the caption in the reading order concatenated content. /// Child elements of the caption. - internal DocumentCaption(string content, IReadOnlyList boundingRegions, IReadOnlyList spans, IReadOnlyList elements) + internal DocumentCaption(string content, IReadOnlyList boundingRegions, IReadOnlyList spans, IReadOnlyList elements) { Content = content; BoundingRegions = boundingRegions; @@ -50,6 +50,6 @@ internal DocumentCaption(string content, IReadOnlyList boundingR /// Location of the caption in the reading order concatenated content. public IReadOnlyList Spans { get; } /// Child elements of the caption. - public IReadOnlyList Elements { get; } + public IReadOnlyList Elements { get; } } } diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentClassifierBuildOperationDetails.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentClassifierBuildOperationDetails.cs index 273322f83e98..4e7234633ea0 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentClassifierBuildOperationDetails.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentClassifierBuildOperationDetails.cs @@ -15,12 +15,13 @@ namespace Azure.AI.DocumentIntelligence public partial class DocumentClassifierBuildOperationDetails : OperationDetails { /// Initializes a new instance of DocumentClassifierBuildOperationDetails. + /// Operation ID. /// Operation status. /// Date and time (UTC) when the operation was created. /// Date and time (UTC) when the status was last updated. /// URL of the resource targeted by this operation. /// is null. - internal DocumentClassifierBuildOperationDetails(OperationStatus status, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, Uri resourceLocation) : base(status, createdDateTime, lastUpdatedDateTime, resourceLocation) + internal DocumentClassifierBuildOperationDetails(Guid operationId, OperationStatus status, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, Uri resourceLocation) : base(operationId, status, createdDateTime, lastUpdatedDateTime, resourceLocation) { Argument.AssertNotNull(resourceLocation, nameof(resourceLocation)); diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFigure.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFigure.Serialization.cs index fafa8207b23c..5dec9412f9d8 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFigure.Serialization.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFigure.Serialization.cs @@ -22,7 +22,7 @@ internal static DocumentFigure DeserializeDocumentFigure(JsonElement element) } Optional> boundingRegions = default; IReadOnlyList spans = default; - Optional> elements = default; + Optional> elements = default; Optional caption = default; Optional> footnotes = default; foreach (var property in element.EnumerateObject()) @@ -57,17 +57,10 @@ internal static DocumentFigure DeserializeDocumentFigure(JsonElement element) { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(item.GetObject()); - } + array.Add(item.GetString()); } elements = array; continue; diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFigure.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFigure.cs index bd66de21908e..d9deb591430e 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFigure.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFigure.cs @@ -24,7 +24,7 @@ internal DocumentFigure(IEnumerable spans) BoundingRegions = new ChangeTrackingList(); Spans = spans.ToList(); - Elements = new ChangeTrackingList(); + Elements = new ChangeTrackingList(); Footnotes = new ChangeTrackingList(); } @@ -34,7 +34,7 @@ internal DocumentFigure(IEnumerable spans) /// Child elements of the figure, excluding any caption or footnotes. /// Caption associated with the figure. /// List of footnotes associated with the figure. - internal DocumentFigure(IReadOnlyList boundingRegions, IReadOnlyList spans, IReadOnlyList elements, DocumentCaption caption, IReadOnlyList footnotes) + internal DocumentFigure(IReadOnlyList boundingRegions, IReadOnlyList spans, IReadOnlyList elements, DocumentCaption caption, IReadOnlyList footnotes) { BoundingRegions = boundingRegions; Spans = spans; @@ -48,7 +48,7 @@ internal DocumentFigure(IReadOnlyList boundingRegions, IReadOnly /// Location of the figure in the reading order concatenated content. public IReadOnlyList Spans { get; } /// Child elements of the figure, excluding any caption or footnotes. - public IReadOnlyList Elements { get; } + public IReadOnlyList Elements { get; } /// Caption associated with the figure. public DocumentCaption Caption { get; } /// List of footnotes associated with the figure. diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFootnote.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFootnote.Serialization.cs index 4267184bc617..782dd75e6736 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFootnote.Serialization.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFootnote.Serialization.cs @@ -23,7 +23,7 @@ internal static DocumentFootnote DeserializeDocumentFootnote(JsonElement element string content = default; Optional> boundingRegions = default; IReadOnlyList spans = default; - Optional> elements = default; + Optional> elements = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("content"u8)) @@ -61,17 +61,10 @@ internal static DocumentFootnote DeserializeDocumentFootnote(JsonElement element { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(item.GetObject()); - } + array.Add(item.GetString()); } elements = array; continue; diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFootnote.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFootnote.cs index a6d2f9dc45fc..ae279afe002b 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFootnote.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentFootnote.cs @@ -27,7 +27,7 @@ internal DocumentFootnote(string content, IEnumerable spans) Content = content; BoundingRegions = new ChangeTrackingList(); Spans = spans.ToList(); - Elements = new ChangeTrackingList(); + Elements = new ChangeTrackingList(); } /// Initializes a new instance of DocumentFootnote. @@ -35,7 +35,7 @@ internal DocumentFootnote(string content, IEnumerable spans) /// Bounding regions covering the footnote. /// Location of the footnote in the reading order concatenated content. /// Child elements of the footnote. - internal DocumentFootnote(string content, IReadOnlyList boundingRegions, IReadOnlyList spans, IReadOnlyList elements) + internal DocumentFootnote(string content, IReadOnlyList boundingRegions, IReadOnlyList spans, IReadOnlyList elements) { Content = content; BoundingRegions = boundingRegions; @@ -50,6 +50,6 @@ internal DocumentFootnote(string content, IReadOnlyList bounding /// Location of the footnote in the reading order concatenated content. public IReadOnlyList Spans { get; } /// Child elements of the footnote. - public IReadOnlyList Elements { get; } + public IReadOnlyList Elements { get; } } } diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentIntelligenceError.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentIntelligenceError.cs index 64c7ce696d4a..275af9294ea8 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentIntelligenceError.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentIntelligenceError.cs @@ -11,12 +11,12 @@ namespace Azure.AI.DocumentIntelligence { - /// Error info. + /// The error object. public partial class DocumentIntelligenceError { /// Initializes a new instance of DocumentIntelligenceError. - /// Error code. - /// Error message. + /// One of a server-defined set of error codes. + /// A human-readable representation of the error. /// or is null. internal DocumentIntelligenceError(string code, string message) { @@ -29,11 +29,11 @@ internal DocumentIntelligenceError(string code, string message) } /// Initializes a new instance of DocumentIntelligenceError. - /// Error code. - /// Error message. - /// Target of the error. - /// List of detailed errors. - /// Detailed error. + /// One of a server-defined set of error codes. + /// A human-readable representation of the error. + /// The target of the error. + /// An array of details about specific errors that led to this reported error. + /// An object containing more specific information than the current object about the error. internal DocumentIntelligenceError(string code, string message, string target, IReadOnlyList details, InnerError innererror) { Code = code; @@ -43,15 +43,15 @@ internal DocumentIntelligenceError(string code, string message, string target, I Innererror = innererror; } - /// Error code. + /// One of a server-defined set of error codes. public string Code { get; } - /// Error message. + /// A human-readable representation of the error. public string Message { get; } - /// Target of the error. + /// The target of the error. public string Target { get; } - /// List of detailed errors. + /// An array of details about specific errors that led to this reported error. public IReadOnlyList Details { get; } - /// Detailed error. + /// An object containing more specific information than the current object about the error. public InnerError Innererror { get; } } } diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentListItem.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentListItem.Serialization.cs index 1c9eae7f7125..da789023a2ee 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentListItem.Serialization.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentListItem.Serialization.cs @@ -24,7 +24,7 @@ internal static DocumentListItem DeserializeDocumentListItem(JsonElement element string content = default; Optional> boundingRegions = default; IReadOnlyList spans = default; - Optional> elements = default; + Optional> elements = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("level"u8)) @@ -67,17 +67,10 @@ internal static DocumentListItem DeserializeDocumentListItem(JsonElement element { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(item.GetObject()); - } + array.Add(item.GetString()); } elements = array; continue; diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentListItem.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentListItem.cs index be172243cc98..17562c824bc0 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentListItem.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentListItem.cs @@ -29,7 +29,7 @@ internal DocumentListItem(int level, string content, IEnumerable s Content = content; BoundingRegions = new ChangeTrackingList(); Spans = spans.ToList(); - Elements = new ChangeTrackingList(); + Elements = new ChangeTrackingList(); } /// Initializes a new instance of DocumentListItem. @@ -38,7 +38,7 @@ internal DocumentListItem(int level, string content, IEnumerable s /// Bounding regions covering the list item. /// Location of the list item in the reading order concatenated content. /// Child elements of the list item. - internal DocumentListItem(int level, string content, IReadOnlyList boundingRegions, IReadOnlyList spans, IReadOnlyList elements) + internal DocumentListItem(int level, string content, IReadOnlyList boundingRegions, IReadOnlyList spans, IReadOnlyList elements) { Level = level; Content = content; @@ -56,6 +56,6 @@ internal DocumentListItem(int level, string content, IReadOnlyList Location of the list item in the reading order concatenated content. public IReadOnlyList Spans { get; } /// Child elements of the list item. - public IReadOnlyList Elements { get; } + public IReadOnlyList Elements { get; } } } diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelAdministrationClient.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelAdministrationClient.cs index 34f71bef4021..049ec5651758 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelAdministrationClient.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelAdministrationClient.cs @@ -21,6 +21,8 @@ public partial class DocumentModelAdministrationClient { private const string AuthorizationHeader = "Ocp-Apim-Subscription-Key"; private readonly AzureKeyCredential _keyCredential; + private static readonly string[] AuthorizationScopes = new string[] { "https://cognitiveservices.azure.com/.default" }; + private readonly TokenCredential _tokenCredential; private readonly HttpPipeline _pipeline; private readonly Uri _endpoint; private readonly string _apiVersion; @@ -44,6 +46,14 @@ protected DocumentModelAdministrationClient() { } + /// Initializes a new instance of DocumentModelAdministrationClient. + /// The Document Intelligence service endpoint. + /// A credential used to authenticate to an Azure Service. + /// or is null. + public DocumentModelAdministrationClient(Uri endpoint, TokenCredential credential) : this(endpoint, credential, new AzureAIDocumentIntelligenceClientOptions()) + { + } + /// Initializes a new instance of DocumentModelAdministrationClient. /// The Document Intelligence service endpoint. /// A credential used to authenticate to an Azure Service. @@ -62,6 +72,24 @@ public DocumentModelAdministrationClient(Uri endpoint, AzureKeyCredential creden _apiVersion = options.Version; } + /// Initializes a new instance of DocumentModelAdministrationClient. + /// The Document Intelligence service endpoint. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + /// or is null. + public DocumentModelAdministrationClient(Uri endpoint, TokenCredential credential, AzureAIDocumentIntelligenceClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new AzureAIDocumentIntelligenceClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _tokenCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) }, new ResponseClassifier()); + _endpoint = endpoint; + _apiVersion = options.Version; + } + /// /// Generates authorization to copy a document model to this location with /// specified modelId and optional description. @@ -729,23 +757,23 @@ public virtual Response DeleteClassifier(string classifierId, RequestContext con /// List all document models. /// The cancellation token to use. /// - public virtual AsyncPageable GetModelsAsync(CancellationToken cancellationToken = default) + public virtual AsyncPageable GetModelsAsync(CancellationToken cancellationToken = default) { RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetModelsRequest(context); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetModelsNextPageRequest(nextLink, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, DocumentModelSummary.DeserializeDocumentModelSummary, ClientDiagnostics, _pipeline, "DocumentModelAdministrationClient.GetModels", "value", "nextLink", context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, DocumentModelDetails.DeserializeDocumentModelDetails, ClientDiagnostics, _pipeline, "DocumentModelAdministrationClient.GetModels", "value", "nextLink", context); } /// List all document models. /// The cancellation token to use. /// - public virtual Pageable GetModels(CancellationToken cancellationToken = default) + public virtual Pageable GetModels(CancellationToken cancellationToken = default) { RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetModelsRequest(context); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetModelsNextPageRequest(nextLink, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, DocumentModelSummary.DeserializeDocumentModelSummary, ClientDiagnostics, _pipeline, "DocumentModelAdministrationClient.GetModels", "value", "nextLink", context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, DocumentModelDetails.DeserializeDocumentModelDetails, ClientDiagnostics, _pipeline, "DocumentModelAdministrationClient.GetModels", "value", "nextLink", context); } /// @@ -803,23 +831,23 @@ public virtual Pageable GetModels(RequestContext context) /// Lists all operations. /// The cancellation token to use. /// - public virtual AsyncPageable GetOperationsAsync(CancellationToken cancellationToken = default) + public virtual AsyncPageable GetOperationsAsync(CancellationToken cancellationToken = default) { RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetOperationsRequest(context); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetOperationsNextPageRequest(nextLink, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, OperationSummary.DeserializeOperationSummary, ClientDiagnostics, _pipeline, "DocumentModelAdministrationClient.GetOperations", "value", "nextLink", context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, OperationDetails.DeserializeOperationDetails, ClientDiagnostics, _pipeline, "DocumentModelAdministrationClient.GetOperations", "value", "nextLink", context); } /// Lists all operations. /// The cancellation token to use. /// - public virtual Pageable GetOperations(CancellationToken cancellationToken = default) + public virtual Pageable GetOperations(CancellationToken cancellationToken = default) { RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetOperationsRequest(context); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetOperationsNextPageRequest(nextLink, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, OperationSummary.DeserializeOperationSummary, ClientDiagnostics, _pipeline, "DocumentModelAdministrationClient.GetOperations", "value", "nextLink", context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, OperationDetails.DeserializeOperationDetails, ClientDiagnostics, _pipeline, "DocumentModelAdministrationClient.GetOperations", "value", "nextLink", context); } /// @@ -953,15 +981,15 @@ public virtual Pageable GetClassifiers(RequestContext context) /// Build request parameters. /// The cancellation token to use. /// is null. - /// - public virtual async Task> BuildDocumentAsync(WaitUntil waitUntil, BuildDocumentModelRequest buildRequest, CancellationToken cancellationToken = default) + /// + public virtual async Task> BuildDocumentModelAsync(WaitUntil waitUntil, BuildDocumentModelRequest buildRequest, CancellationToken cancellationToken = default) { Argument.AssertNotNull(buildRequest, nameof(buildRequest)); RequestContext context = FromCancellationToken(cancellationToken); using RequestContent content = buildRequest.ToRequestContent(); - Operation response = await BuildDocumentAsync(waitUntil, content, context).ConfigureAwait(false); - return ProtocolOperationHelpers.Convert(response, DocumentModelDetails.FromResponse, ClientDiagnostics, "DocumentModelAdministrationClient.BuildDocument"); + Operation response = await BuildDocumentModelAsync(waitUntil, content, context).ConfigureAwait(false); + return ProtocolOperationHelpers.Convert(response, DocumentModelDetails.FromResponse, ClientDiagnostics, "DocumentModelAdministrationClient.BuildDocumentModel"); } /// Builds a custom document analysis model. @@ -969,15 +997,15 @@ public virtual async Task> BuildDocumentAsync(Wa /// Build request parameters. /// The cancellation token to use. /// is null. - /// - public virtual Operation BuildDocument(WaitUntil waitUntil, BuildDocumentModelRequest buildRequest, CancellationToken cancellationToken = default) + /// + public virtual Operation BuildDocumentModel(WaitUntil waitUntil, BuildDocumentModelRequest buildRequest, CancellationToken cancellationToken = default) { Argument.AssertNotNull(buildRequest, nameof(buildRequest)); RequestContext context = FromCancellationToken(cancellationToken); using RequestContent content = buildRequest.ToRequestContent(); - Operation response = BuildDocument(waitUntil, content, context); - return ProtocolOperationHelpers.Convert(response, DocumentModelDetails.FromResponse, ClientDiagnostics, "DocumentModelAdministrationClient.BuildDocument"); + Operation response = BuildDocumentModel(waitUntil, content, context); + return ProtocolOperationHelpers.Convert(response, DocumentModelDetails.FromResponse, ClientDiagnostics, "DocumentModelAdministrationClient.BuildDocumentModel"); } /// @@ -990,7 +1018,7 @@ public virtual Operation BuildDocument(WaitUntil waitUntil /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -1001,17 +1029,17 @@ public virtual Operation BuildDocument(WaitUntil waitUntil /// is null. /// Service returned a non-success status code. /// The representing an asynchronous operation on the service. - /// - public virtual async Task> BuildDocumentAsync(WaitUntil waitUntil, RequestContent content, RequestContext context = null) + /// + public virtual async Task> BuildDocumentModelAsync(WaitUntil waitUntil, RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); - using var scope = ClientDiagnostics.CreateScope("DocumentModelAdministrationClient.BuildDocument"); + using var scope = ClientDiagnostics.CreateScope("DocumentModelAdministrationClient.BuildDocumentModel"); scope.Start(); try { - using HttpMessage message = CreateBuildDocumentRequest(content, context); - return await ProtocolOperationHelpers.ProcessMessageAsync(_pipeline, message, ClientDiagnostics, "DocumentModelAdministrationClient.BuildDocument", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + using HttpMessage message = CreateBuildDocumentModelRequest(content, context); + return await ProtocolOperationHelpers.ProcessMessageAsync(_pipeline, message, ClientDiagnostics, "DocumentModelAdministrationClient.BuildDocumentModel", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); } catch (Exception e) { @@ -1030,7 +1058,7 @@ public virtual async Task> BuildDocumentAsync(WaitUntil wa /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -1041,17 +1069,17 @@ public virtual async Task> BuildDocumentAsync(WaitUntil wa /// is null. /// Service returned a non-success status code. /// The representing an asynchronous operation on the service. - /// - public virtual Operation BuildDocument(WaitUntil waitUntil, RequestContent content, RequestContext context = null) + /// + public virtual Operation BuildDocumentModel(WaitUntil waitUntil, RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); - using var scope = ClientDiagnostics.CreateScope("DocumentModelAdministrationClient.BuildDocument"); + using var scope = ClientDiagnostics.CreateScope("DocumentModelAdministrationClient.BuildDocumentModel"); scope.Start(); try { - using HttpMessage message = CreateBuildDocumentRequest(content, context); - return ProtocolOperationHelpers.ProcessMessage(_pipeline, message, ClientDiagnostics, "DocumentModelAdministrationClient.BuildDocument", OperationFinalStateVia.OperationLocation, context, waitUntil); + using HttpMessage message = CreateBuildDocumentModelRequest(content, context); + return ProtocolOperationHelpers.ProcessMessage(_pipeline, message, ClientDiagnostics, "DocumentModelAdministrationClient.BuildDocumentModel", OperationFinalStateVia.OperationLocation, context, waitUntil); } catch (Exception e) { @@ -1408,7 +1436,7 @@ public virtual Operation BuildClassifier(WaitUntil waitUntil, Reques } } - internal HttpMessage CreateBuildDocumentRequest(RequestContent content, RequestContext context) + internal HttpMessage CreateBuildDocumentModelRequest(RequestContent content, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier202); var request = message.Request; diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelBuildOperationDetails.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelBuildOperationDetails.cs index bf5b8a5a85a0..8e9173833baf 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelBuildOperationDetails.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelBuildOperationDetails.cs @@ -15,12 +15,13 @@ namespace Azure.AI.DocumentIntelligence public partial class DocumentModelBuildOperationDetails : OperationDetails { /// Initializes a new instance of DocumentModelBuildOperationDetails. + /// Operation ID. /// Operation status. /// Date and time (UTC) when the operation was created. /// Date and time (UTC) when the status was last updated. /// URL of the resource targeted by this operation. /// is null. - internal DocumentModelBuildOperationDetails(OperationStatus status, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, Uri resourceLocation) : base(status, createdDateTime, lastUpdatedDateTime, resourceLocation) + internal DocumentModelBuildOperationDetails(Guid operationId, OperationStatus status, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, Uri resourceLocation) : base(operationId, status, createdDateTime, lastUpdatedDateTime, resourceLocation) { Argument.AssertNotNull(resourceLocation, nameof(resourceLocation)); diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelComposeOperationDetails.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelComposeOperationDetails.cs index 69272c3a04d7..dcec84ca7ca2 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelComposeOperationDetails.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelComposeOperationDetails.cs @@ -15,12 +15,13 @@ namespace Azure.AI.DocumentIntelligence public partial class DocumentModelComposeOperationDetails : OperationDetails { /// Initializes a new instance of DocumentModelComposeOperationDetails. + /// Operation ID. /// Operation status. /// Date and time (UTC) when the operation was created. /// Date and time (UTC) when the status was last updated. /// URL of the resource targeted by this operation. /// is null. - internal DocumentModelComposeOperationDetails(OperationStatus status, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, Uri resourceLocation) : base(status, createdDateTime, lastUpdatedDateTime, resourceLocation) + internal DocumentModelComposeOperationDetails(Guid operationId, OperationStatus status, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, Uri resourceLocation) : base(operationId, status, createdDateTime, lastUpdatedDateTime, resourceLocation) { Argument.AssertNotNull(resourceLocation, nameof(resourceLocation)); diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelCopyToOperationDetails.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelCopyToOperationDetails.cs index 5b63c1607dbc..b44fcd7e2035 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelCopyToOperationDetails.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelCopyToOperationDetails.cs @@ -15,12 +15,13 @@ namespace Azure.AI.DocumentIntelligence public partial class DocumentModelCopyToOperationDetails : OperationDetails { /// Initializes a new instance of DocumentModelCopyToOperationDetails. + /// Operation ID. /// Operation status. /// Date and time (UTC) when the operation was created. /// Date and time (UTC) when the status was last updated. /// URL of the resource targeted by this operation. /// is null. - internal DocumentModelCopyToOperationDetails(OperationStatus status, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, Uri resourceLocation) : base(status, createdDateTime, lastUpdatedDateTime, resourceLocation) + internal DocumentModelCopyToOperationDetails(Guid operationId, OperationStatus status, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, Uri resourceLocation) : base(operationId, status, createdDateTime, lastUpdatedDateTime, resourceLocation) { Argument.AssertNotNull(resourceLocation, nameof(resourceLocation)); diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelDetails.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelDetails.Serialization.cs index d327c8371ee9..8d9364462c21 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelDetails.Serialization.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelDetails.Serialization.cs @@ -21,100 +21,104 @@ internal static DocumentModelDetails DeserializeDocumentModelDetails(JsonElement { return null; } - DocumentBuildMode buildMode = default; - Optional azureBlobSource = default; - Optional azureBlobFileListSource = default; - Optional> docTypes = default; string modelId = default; Optional description = default; DateTimeOffset createdDateTime = default; Optional expirationDateTime = default; Optional apiVersion = default; Optional> tags = default; + Optional buildMode = default; + Optional azureBlobSource = default; + Optional azureBlobFileListSource = default; + Optional> docTypes = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("buildMode"u8)) + if (property.NameEquals("modelId"u8)) { - buildMode = new DocumentBuildMode(property.Value.GetString()); + modelId = property.Value.GetString(); continue; } - if (property.NameEquals("azureBlobSource"u8)) + if (property.NameEquals("description"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - azureBlobSource = AzureBlobContentSource.DeserializeAzureBlobContentSource(property.Value); + description = property.Value.GetString(); continue; } - if (property.NameEquals("azureBlobFileListSource"u8)) + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("expirationDateTime"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - azureBlobFileListSource = AzureBlobFileListContentSource.DeserializeAzureBlobFileListContentSource(property.Value); + expirationDateTime = property.Value.GetDateTimeOffset("O"); continue; } - if (property.NameEquals("docTypes"u8)) + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - Dictionary dictionary = new Dictionary(); + Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { - dictionary.Add(property0.Name, DocumentTypeDetails.DeserializeDocumentTypeDetails(property0.Value)); + dictionary.Add(property0.Name, property0.Value.GetString()); } - docTypes = dictionary; - continue; - } - if (property.NameEquals("modelId"u8)) - { - modelId = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); + tags = dictionary; continue; } - if (property.NameEquals("createdDateTime"u8)) + if (property.NameEquals("buildMode"u8)) { - createdDateTime = property.Value.GetDateTimeOffset("O"); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + buildMode = new DocumentBuildMode(property.Value.GetString()); continue; } - if (property.NameEquals("expirationDateTime"u8)) + if (property.NameEquals("azureBlobSource"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - expirationDateTime = property.Value.GetDateTimeOffset("O"); + azureBlobSource = AzureBlobContentSource.DeserializeAzureBlobContentSource(property.Value); continue; } - if (property.NameEquals("apiVersion"u8)) + if (property.NameEquals("azureBlobFileListSource"u8)) { - apiVersion = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + azureBlobFileListSource = AzureBlobFileListContentSource.DeserializeAzureBlobFileListContentSource(property.Value); continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("docTypes"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - Dictionary dictionary = new Dictionary(); + Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { - dictionary.Add(property0.Name, property0.Value.GetString()); + dictionary.Add(property0.Name, DocumentTypeDetails.DeserializeDocumentTypeDetails(property0.Value)); } - tags = dictionary; + docTypes = dictionary; continue; } } - return new DocumentModelDetails(modelId, description.Value, createdDateTime, Optional.ToNullable(expirationDateTime), apiVersion.Value, Optional.ToDictionary(tags), buildMode, azureBlobSource.Value, azureBlobFileListSource.Value, Optional.ToDictionary(docTypes)); + return new DocumentModelDetails(modelId, description.Value, createdDateTime, Optional.ToNullable(expirationDateTime), apiVersion.Value, Optional.ToDictionary(tags), Optional.ToNullable(buildMode), azureBlobSource.Value, azureBlobFileListSource.Value, Optional.ToDictionary(docTypes)); } } } diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelDetails.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelDetails.cs index 65245bd87f5b..bc29915f5289 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelDetails.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelDetails.cs @@ -12,17 +12,19 @@ namespace Azure.AI.DocumentIntelligence { /// Document model info. - public partial class DocumentModelDetails : DocumentModelSummary + public partial class DocumentModelDetails { /// Initializes a new instance of DocumentModelDetails. /// Unique document model name. - /// Custom document model build mode. + /// Date and time (UTC) when the document model was created. /// is null. - internal DocumentModelDetails(string modelId, DocumentBuildMode buildMode) : base(modelId) + internal DocumentModelDetails(string modelId, DateTimeOffset createdDateTime) { Argument.AssertNotNull(modelId, nameof(modelId)); - BuildMode = buildMode; + ModelId = modelId; + CreatedDateTime = createdDateTime; + Tags = new ChangeTrackingDictionary(); DocTypes = new ChangeTrackingDictionary(); } @@ -43,16 +45,34 @@ internal DocumentModelDetails(string modelId, DocumentBuildMode buildMode) : bas /// azureBlobSource or azureBlobFileListSource must be specified. /// /// Supported document types. - internal DocumentModelDetails(string modelId, string description, DateTimeOffset createdDateTime, DateTimeOffset? expirationDateTime, string apiVersion, IReadOnlyDictionary tags, DocumentBuildMode buildMode, AzureBlobContentSource azureBlobSource, AzureBlobFileListContentSource azureBlobFileListSource, IReadOnlyDictionary docTypes) : base(modelId, description, createdDateTime, expirationDateTime, apiVersion, tags) + internal DocumentModelDetails(string modelId, string description, DateTimeOffset createdDateTime, DateTimeOffset? expirationDateTime, string apiVersion, IReadOnlyDictionary tags, DocumentBuildMode? buildMode, AzureBlobContentSource azureBlobSource, AzureBlobFileListContentSource azureBlobFileListSource, IReadOnlyDictionary docTypes) { + ModelId = modelId; + Description = description; + CreatedDateTime = createdDateTime; + ExpirationDateTime = expirationDateTime; + ApiVersion = apiVersion; + Tags = tags; BuildMode = buildMode; AzureBlobSource = azureBlobSource; AzureBlobFileListSource = azureBlobFileListSource; DocTypes = docTypes; } + /// Unique document model name. + public string ModelId { get; } + /// Document model description. + public string Description { get; } + /// Date and time (UTC) when the document model was created. + public DateTimeOffset CreatedDateTime { get; } + /// Date and time (UTC) when the document model will expire. + public DateTimeOffset? ExpirationDateTime { get; } + /// API version used to create this document model. + public string ApiVersion { get; } + /// List of key-value tag attributes associated with the document model. + public IReadOnlyDictionary Tags { get; } /// Custom document model build mode. - public DocumentBuildMode BuildMode { get; } + public DocumentBuildMode? BuildMode { get; } /// /// Azure Blob Storage location containing the training data. Either /// azureBlobSource or azureBlobFileListSource must be specified. diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelSummary.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelSummary.Serialization.cs deleted file mode 100644 index 58484299e03a..000000000000 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelSummary.Serialization.cs +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using Azure; -using Azure.Core; - -namespace Azure.AI.DocumentIntelligence -{ - public partial class DocumentModelSummary - { - internal static DocumentModelSummary DeserializeDocumentModelSummary(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string modelId = default; - Optional description = default; - DateTimeOffset createdDateTime = default; - Optional expirationDateTime = default; - Optional apiVersion = default; - Optional> tags = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("modelId"u8)) - { - modelId = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("createdDateTime"u8)) - { - createdDateTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("expirationDateTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - expirationDateTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("apiVersion"u8)) - { - apiVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - } - return new DocumentModelSummary(modelId, description.Value, createdDateTime, Optional.ToNullable(expirationDateTime), apiVersion.Value, Optional.ToDictionary(tags)); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static DocumentModelSummary FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeDocumentModelSummary(document.RootElement); - } - } -} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelSummary.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelSummary.cs deleted file mode 100644 index 2b8b6dc08e3c..000000000000 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentModelSummary.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.AI.DocumentIntelligence -{ - /// Document model summary. - public partial class DocumentModelSummary - { - /// Initializes a new instance of DocumentModelSummary. - /// Unique document model name. - /// is null. - internal DocumentModelSummary(string modelId) - { - Argument.AssertNotNull(modelId, nameof(modelId)); - - ModelId = modelId; - Tags = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of DocumentModelSummary. - /// Unique document model name. - /// Document model description. - /// Date and time (UTC) when the document model was created. - /// Date and time (UTC) when the document model will expire. - /// API version used to create this document model. - /// List of key-value tag attributes associated with the document model. - internal DocumentModelSummary(string modelId, string description, DateTimeOffset createdDateTime, DateTimeOffset? expirationDateTime, string apiVersion, IReadOnlyDictionary tags) - { - ModelId = modelId; - Description = description; - CreatedDateTime = createdDateTime; - ExpirationDateTime = expirationDateTime; - ApiVersion = apiVersion; - Tags = tags; - } - - /// Unique document model name. - public string ModelId { get; } - /// Document model description. - public string Description { get; } - /// Date and time (UTC) when the document model was created. - public DateTimeOffset CreatedDateTime { get; } - /// Date and time (UTC) when the document model will expire. - public DateTimeOffset? ExpirationDateTime { get; } - /// API version used to create this document model. - public string ApiVersion { get; } - /// List of key-value tag attributes associated with the document model. - public IReadOnlyDictionary Tags { get; } - } -} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSection.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSection.Serialization.cs index 3e472fb71b45..2aa2e6399e8c 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSection.Serialization.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSection.Serialization.cs @@ -21,7 +21,7 @@ internal static DocumentSection DeserializeDocumentSection(JsonElement element) return null; } IReadOnlyList spans = default; - Optional> elements = default; + Optional> elements = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("spans"u8)) @@ -40,17 +40,10 @@ internal static DocumentSection DeserializeDocumentSection(JsonElement element) { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(item.GetObject()); - } + array.Add(item.GetString()); } elements = array; continue; diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSection.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSection.cs index 0357da6e9d36..41ae16da014a 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSection.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentSection.cs @@ -23,13 +23,13 @@ internal DocumentSection(IEnumerable spans) Argument.AssertNotNull(spans, nameof(spans)); Spans = spans.ToList(); - Elements = new ChangeTrackingList(); + Elements = new ChangeTrackingList(); } /// Initializes a new instance of DocumentSection. /// Location of the section in the reading order concatenated content. /// Child elements of the section. - internal DocumentSection(IReadOnlyList spans, IReadOnlyList elements) + internal DocumentSection(IReadOnlyList spans, IReadOnlyList elements) { Spans = spans; Elements = elements; @@ -38,6 +38,6 @@ internal DocumentSection(IReadOnlyList spans, IReadOnlyList Location of the section in the reading order concatenated content. public IReadOnlyList Spans { get; } /// Child elements of the section. - public IReadOnlyList Elements { get; } + public IReadOnlyList Elements { get; } } } diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTableCell.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTableCell.Serialization.cs index 0fe187c84e5c..e2719e2396eb 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTableCell.Serialization.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTableCell.Serialization.cs @@ -28,7 +28,7 @@ internal static DocumentTableCell DeserializeDocumentTableCell(JsonElement eleme string content = default; Optional> boundingRegions = default; IReadOnlyList spans = default; - Optional> elements = default; + Optional> elements = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("kind"u8)) @@ -103,17 +103,10 @@ internal static DocumentTableCell DeserializeDocumentTableCell(JsonElement eleme { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(item.GetObject()); - } + array.Add(item.GetString()); } elements = array; continue; diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTableCell.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTableCell.cs index 1042dee81d5a..c4e0e6e721bc 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTableCell.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/DocumentTableCell.cs @@ -31,7 +31,7 @@ internal DocumentTableCell(int rowIndex, int columnIndex, string content, IEnume Content = content; BoundingRegions = new ChangeTrackingList(); Spans = spans.ToList(); - Elements = new ChangeTrackingList(); + Elements = new ChangeTrackingList(); } /// Initializes a new instance of DocumentTableCell. @@ -44,7 +44,7 @@ internal DocumentTableCell(int rowIndex, int columnIndex, string content, IEnume /// Bounding regions covering the table cell. /// Location of the table cell in the reading order concatenated content. /// Child elements of the table cell. - internal DocumentTableCell(DocumentTableCellKind? kind, int rowIndex, int columnIndex, int? rowSpan, int? columnSpan, string content, IReadOnlyList boundingRegions, IReadOnlyList spans, IReadOnlyList elements) + internal DocumentTableCell(DocumentTableCellKind? kind, int rowIndex, int columnIndex, int? rowSpan, int? columnSpan, string content, IReadOnlyList boundingRegions, IReadOnlyList spans, IReadOnlyList elements) { Kind = kind; RowIndex = rowIndex; @@ -74,6 +74,6 @@ internal DocumentTableCell(DocumentTableCellKind? kind, int rowIndex, int column /// Location of the table cell in the reading order concatenated content. public IReadOnlyList Spans { get; } /// Child elements of the table cell. - public IReadOnlyList Elements { get; } + public IReadOnlyList Elements { get; } } } diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/InnerError.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/InnerError.Serialization.cs index e837116137e6..fa561bb2d2f1 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/InnerError.Serialization.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/InnerError.Serialization.cs @@ -19,7 +19,7 @@ internal static InnerError DeserializeInnerError(JsonElement element) { return null; } - string code = default; + Optional code = default; Optional message = default; Optional innererror = default; foreach (var property in element.EnumerateObject()) @@ -44,7 +44,7 @@ internal static InnerError DeserializeInnerError(JsonElement element) continue; } } - return new InnerError(code, message.Value, innererror.Value); + return new InnerError(code.Value, message.Value, innererror.Value); } /// Deserializes the model from a raw response. diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/InnerError.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/InnerError.cs index 656e62d12a85..b0f6f71a9465 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/InnerError.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/InnerError.cs @@ -5,40 +5,32 @@ #nullable disable -using System; -using Azure.Core; - namespace Azure.AI.DocumentIntelligence { - /// Detailed error. + /// An object containing more specific information about the error. public partial class InnerError { /// Initializes a new instance of InnerError. - /// Error code. - /// is null. - internal InnerError(string code) + internal InnerError() { - Argument.AssertNotNull(code, nameof(code)); - - Code = code; } /// Initializes a new instance of InnerError. - /// Error code. - /// Error message. - /// Detailed error. - internal InnerError(string code, string message, InnerError innererror) + /// One of a server-defined set of error codes. + /// A human-readable representation of the error. + /// Inner error. + internal InnerError(string code, string message, InnerError innerErrorObject) { Code = code; Message = message; - Innererror = innererror; + InnerErrorObject = innerErrorObject; } - /// Error code. + /// One of a server-defined set of error codes. public string Code { get; } - /// Error message. + /// A human-readable representation of the error. public string Message { get; } - /// Detailed error. - public InnerError Innererror { get; } + /// Inner error. + public InnerError InnerErrorObject { get; } } } diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationDetails.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationDetails.Serialization.cs index 3b6cdbdf63b8..71fcb4e201eb 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationDetails.Serialization.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationDetails.Serialization.cs @@ -26,7 +26,6 @@ internal static OperationDetails DeserializeOperationDetails(JsonElement element case "documentModelCompose": return DocumentModelComposeOperationDetails.DeserializeDocumentModelComposeOperationDetails(element); case "documentModelCopyTo": return DocumentModelCopyToOperationDetails.DeserializeDocumentModelCopyToOperationDetails(element); case "documentClassifierBuild": return DocumentClassifierBuildOperationDetails.DeserializeDocumentClassifierBuildOperationDetails(element); - case "chatBuild": return ChatIndexBuildOperationDetails.DeserializeChatIndexBuildOperationDetails(element); } } return UnknownOperationDetails.DeserializeUnknownOperationDetails(element); diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationDetails.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationDetails.cs index 825fc628f234..e1fc41af2fde 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationDetails.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationDetails.cs @@ -12,22 +12,24 @@ namespace Azure.AI.DocumentIntelligence { /// - /// Get Operation response object. + /// Operation info. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . + /// The available derived classes include , , and . /// public abstract partial class OperationDetails { /// Initializes a new instance of OperationDetails. + /// Operation ID. /// Operation status. /// Date and time (UTC) when the operation was created. /// Date and time (UTC) when the status was last updated. /// URL of the resource targeted by this operation. /// is null. - protected OperationDetails(OperationStatus status, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, Uri resourceLocation) + protected OperationDetails(Guid operationId, OperationStatus status, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, Uri resourceLocation) { Argument.AssertNotNull(resourceLocation, nameof(resourceLocation)); + OperationId = operationId; Status = status; CreatedDateTime = createdDateTime; LastUpdatedDateTime = lastUpdatedDateTime; diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationKind.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationKind.cs index 6f94849bf70b..abe6a2365934 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationKind.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationKind.cs @@ -11,7 +11,7 @@ namespace Azure.AI.DocumentIntelligence { /// Type of operation. - public readonly partial struct OperationKind : IEquatable + internal readonly partial struct OperationKind : IEquatable { private readonly string _value; @@ -26,7 +26,6 @@ public OperationKind(string value) private const string DocumentModelComposeValue = "documentModelCompose"; private const string DocumentModelCopyToValue = "documentModelCopyTo"; private const string DocumentClassifierBuildValue = "documentClassifierBuild"; - private const string ChatBuildValue = "chatBuild"; /// Build a new custom document model. public static OperationKind DocumentModelBuild { get; } = new OperationKind(DocumentModelBuildValue); @@ -39,8 +38,6 @@ public OperationKind(string value) public static OperationKind DocumentModelCopyTo { get; } = new OperationKind(DocumentModelCopyToValue); /// Build a new custom classifier model. public static OperationKind DocumentClassifierBuild { get; } = new OperationKind(DocumentClassifierBuildValue); - /// Build a new chat index. - public static OperationKind ChatBuild { get; } = new OperationKind(ChatBuildValue); /// Determines if two values are the same. public static bool operator ==(OperationKind left, OperationKind right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationSummary.Serialization.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationSummary.Serialization.cs deleted file mode 100644 index ce6939253507..000000000000 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationSummary.Serialization.cs +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using Azure; -using Azure.Core; - -namespace Azure.AI.DocumentIntelligence -{ - public partial class OperationSummary - { - internal static OperationSummary DeserializeOperationSummary(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Guid operationId = default; - OperationStatus status = default; - Optional percentCompleted = default; - DateTimeOffset createdDateTime = default; - DateTimeOffset lastUpdatedDateTime = default; - OperationKind kind = default; - Uri resourceLocation = default; - Optional apiVersion = default; - Optional> tags = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("operationId"u8)) - { - operationId = property.Value.GetGuid(); - continue; - } - if (property.NameEquals("status"u8)) - { - status = new OperationStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("percentCompleted"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - percentCompleted = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("createdDateTime"u8)) - { - createdDateTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("lastUpdatedDateTime"u8)) - { - lastUpdatedDateTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new OperationKind(property.Value.GetString()); - continue; - } - if (property.NameEquals("resourceLocation"u8)) - { - resourceLocation = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("apiVersion"u8)) - { - apiVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - } - return new OperationSummary(operationId, status, Optional.ToNullable(percentCompleted), createdDateTime, lastUpdatedDateTime, kind, resourceLocation, apiVersion.Value, Optional.ToDictionary(tags)); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static OperationSummary FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeOperationSummary(document.RootElement); - } - } -} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationSummary.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationSummary.cs deleted file mode 100644 index 5b66bd24c862..000000000000 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/OperationSummary.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.AI.DocumentIntelligence -{ - /// Operation info. - public partial class OperationSummary - { - /// Initializes a new instance of OperationSummary. - /// Operation ID. - /// Operation status. - /// Date and time (UTC) when the operation was created. - /// Date and time (UTC) when the status was last updated. - /// Type of operation. - /// URL of the resource targeted by this operation. - /// is null. - internal OperationSummary(Guid operationId, OperationStatus status, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, OperationKind kind, Uri resourceLocation) - { - Argument.AssertNotNull(resourceLocation, nameof(resourceLocation)); - - OperationId = operationId; - Status = status; - CreatedDateTime = createdDateTime; - LastUpdatedDateTime = lastUpdatedDateTime; - Kind = kind; - ResourceLocation = resourceLocation; - Tags = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of OperationSummary. - /// Operation ID. - /// Operation status. - /// Operation progress (0-100). - /// Date and time (UTC) when the operation was created. - /// Date and time (UTC) when the status was last updated. - /// Type of operation. - /// URL of the resource targeted by this operation. - /// API version used to create this operation. - /// List of key-value tag attributes associated with the document model. - internal OperationSummary(Guid operationId, OperationStatus status, int? percentCompleted, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, OperationKind kind, Uri resourceLocation, string apiVersion, IReadOnlyDictionary tags) - { - OperationId = operationId; - Status = status; - PercentCompleted = percentCompleted; - CreatedDateTime = createdDateTime; - LastUpdatedDateTime = lastUpdatedDateTime; - Kind = kind; - ResourceLocation = resourceLocation; - ApiVersion = apiVersion; - Tags = tags; - } - - /// Operation ID. - public Guid OperationId { get; } - /// Operation status. - public OperationStatus Status { get; } - /// Operation progress (0-100). - public int? PercentCompleted { get; } - /// Date and time (UTC) when the operation was created. - public DateTimeOffset CreatedDateTime { get; } - /// Date and time (UTC) when the status was last updated. - public DateTimeOffset LastUpdatedDateTime { get; } - /// Type of operation. - public OperationKind Kind { get; } - /// URL of the resource targeted by this operation. - public Uri ResourceLocation { get; } - /// API version used to create this operation. - public string ApiVersion { get; } - /// List of key-value tag attributes associated with the document model. - public IReadOnlyDictionary Tags { get; } - } -} diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/UnknownOperationDetails.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/UnknownOperationDetails.cs index 24b94edd7bf6..99fce2abd815 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/UnknownOperationDetails.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/UnknownOperationDetails.cs @@ -15,12 +15,13 @@ namespace Azure.AI.DocumentIntelligence internal partial class UnknownOperationDetails : OperationDetails { /// Initializes a new instance of UnknownOperationDetails. + /// Operation ID. /// Operation status. /// Date and time (UTC) when the operation was created. /// Date and time (UTC) when the status was last updated. /// URL of the resource targeted by this operation. /// is null. - internal UnknownOperationDetails(OperationStatus status, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, Uri resourceLocation) : base(status, createdDateTime, lastUpdatedDateTime, resourceLocation) + internal UnknownOperationDetails(Guid operationId, OperationStatus status, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, Uri resourceLocation) : base(operationId, status, createdDateTime, lastUpdatedDateTime, resourceLocation) { Argument.AssertNotNull(resourceLocation, nameof(resourceLocation)); } diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentAnalysisClient/DocumentClassifierLiveTests.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentAnalysisClient/DocumentClassifierLiveTests.cs index 0d4beb8c3fd8..ec3676818048 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentAnalysisClient/DocumentClassifierLiveTests.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentAnalysisClient/DocumentClassifierLiveTests.cs @@ -61,7 +61,7 @@ private void ValidateGenericClassifierResult(AnalyzeResult analyzeResult, string Assert.That(analyzeResult.ModelId, Is.EqualTo(classifierId)); Assert.That(analyzeResult.ApiVersion, Is.EqualTo(ServiceVersionString)); Assert.That(analyzeResult.StringIndexType, Is.EqualTo(StringIndexType.TextElements)); - Assert.That(analyzeResult.ContentFormat, Is.Null); + Assert.That(analyzeResult.ContentFormat, Is.Not.EqualTo(default(ContentFormat))); Assert.That(analyzeResult.Content, Is.Empty); Assert.That(analyzeResult.Paragraphs, Is.Empty); @@ -117,6 +117,8 @@ private void ValidateIrs1040ClassifierResult(AnalyzeResult analyzeResult, string { ValidateGenericClassifierResult(analyzeResult, classifierId); + Assert.That(analyzeResult.ContentFormat, Is.EqualTo(ContentFormat.Text)); + Assert.That(analyzeResult.Pages.Count, Is.EqualTo(4)); foreach (var page in analyzeResult.Pages) @@ -127,15 +129,12 @@ private void ValidateIrs1040ClassifierResult(AnalyzeResult analyzeResult, string Assert.That(page.Unit, Is.EqualTo(LengthUnit.Inch)); } - Assert.That(analyzeResult.Documents.Count, Is.EqualTo(2)); + Assert.That(analyzeResult.Documents.Count, Is.EqualTo(1)); - var document0 = analyzeResult.Documents[0]; - var document1 = analyzeResult.Documents[1]; + var document = analyzeResult.Documents.Single(); - Assert.That(document0.DocType, Is.EqualTo("IRS-1040-A")); - Assert.That(document1.DocType, Is.EqualTo("IRS-1040-C")); - Assert.That(document1.BoundingRegions.Count, Is.EqualTo(2)); - Assert.That(document1.BoundingRegions.Count, Is.EqualTo(2)); + Assert.That(document.DocType, Is.EqualTo("IRS-1040-A")); + Assert.That(document.BoundingRegions.Count, Is.EqualTo(4)); } private void AssertSingleEmptySpan(IReadOnlyList spans) diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentModelAdministrationClient/DocumentModelAdministrationLiveTests.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentModelAdministrationClient/DocumentModelAdministrationLiveTests.cs index d5771f06071d..5eabda55c38f 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentModelAdministrationClient/DocumentModelAdministrationLiveTests.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentModelAdministrationClient/DocumentModelAdministrationLiveTests.cs @@ -28,7 +28,7 @@ public DocumentModelAdministrationLiveTests(bool isAsync) [RecordedTest] [TestCaseSource(nameof(s_buildDocumentModelTestCases))] - public async Task BuildDocumentWithAzureBlobContentSource(DocumentBuildMode buildMode) + public async Task BuildDocumentModelWithAzureBlobContentSource(DocumentBuildMode buildMode) { if (buildMode == DocumentBuildMode.Neural && Recording.Mode == RecordedTestMode.Live) { @@ -57,7 +57,7 @@ public async Task BuildDocumentWithAzureBlobContentSource(DocumentBuildMode buil try { - operation = await client.BuildDocumentAsync(WaitUntil.Started, request); + operation = await client.BuildDocumentModelAsync(WaitUntil.Started, request); await (buildMode == DocumentBuildMode.Neural ? operation.WaitForCompletionAsync(TimeSpan.FromMinutes(1), CancellationToken.None) @@ -127,7 +127,7 @@ public async Task BuildDocumentWithAzureBlobContentSource(DocumentBuildMode buil } [RecordedTest] - public void BuildDocumentCanParseError() + public void BuildDocumentModelCanParseError() { var client = CreateDocumentModelAdministrationClient(); var modelId = Recording.GenerateId(); @@ -141,7 +141,7 @@ public void BuildDocumentCanParseError() AzureBlobSource = source }; - RequestFailedException ex = Assert.ThrowsAsync(async () => await client.BuildDocumentAsync(WaitUntil.Started, request)); + RequestFailedException ex = Assert.ThrowsAsync(async () => await client.BuildDocumentModelAsync(WaitUntil.Started, request)); Assert.That(ex.ErrorCode, Is.EqualTo("InvalidRequest")); } @@ -342,9 +342,9 @@ public async Task GetModels() { disposableModel0.ModelId, disposableModel0.Value }, { disposableModel1.ModelId, disposableModel1.Value } }; - var idMapping = new Dictionary(); + var idMapping = new Dictionary(); - await foreach (DocumentModelSummary model in client.GetModelsAsync()) + await foreach (DocumentModelDetails model in client.GetModelsAsync()) { if (expectedIdMapping.ContainsKey(model.ModelId)) { @@ -364,7 +364,7 @@ public async Task GetModels() Assert.That(idMapping, Contains.Key(id)); DocumentModelDetails expected = expectedIdMapping[id]; - DocumentModelSummary model = idMapping[id]; + DocumentModelDetails model = idMapping[id]; Assert.That(model.ModelId, Is.EqualTo(expected.ModelId)); Assert.That(model.Description, Is.EqualTo(expected.Description)); @@ -372,6 +372,10 @@ public async Task GetModels() Assert.That(model.CreatedDateTime, Is.EqualTo(expected.CreatedDateTime)); Assert.That(model.ExpirationDateTime, Is.EqualTo(expected.ExpirationDateTime)); Assert.That(model.Tags, Is.EquivalentTo(expected.Tags)); + + Assert.That(model.AzureBlobSource, Is.Null); + Assert.That(model.AzureBlobFileListSource, Is.Null); + Assert.That(model.DocTypes, Is.Empty); } } diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentModelAdministrationClient/MiscellaneousOperationsLiveTests.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentModelAdministrationClient/MiscellaneousOperationsLiveTests.cs index 756c1f42e391..0542099db620 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentModelAdministrationClient/MiscellaneousOperationsLiveTests.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/DocumentModelAdministrationClient/MiscellaneousOperationsLiveTests.cs @@ -125,21 +125,21 @@ public async Task GetOperations() var operationId0 = new Guid(disposableModel0.Operation.Id); var operationId1 = new Guid(disposableModel1.Operation.Id); - OperationDetails operationDetails0 = await client.GetOperationAsync(operationId0); - OperationDetails operationDetails1 = await client.GetOperationAsync(operationId1); + OperationDetails expectedOperation0 = await client.GetOperationAsync(operationId0); + OperationDetails expectedOperation1 = await client.GetOperationAsync(operationId1); var expectedIdMapping = new Dictionary() { - { operationId0, operationDetails0 }, - { operationId1, operationDetails1 } + { operationId0, expectedOperation0 }, + { operationId1, expectedOperation1 } }; - var idMapping = new Dictionary(); + var idMapping = new Dictionary(); - await foreach (OperationSummary operationSummary in client.GetOperationsAsync()) + await foreach (OperationDetails operation in client.GetOperationsAsync()) { - if (expectedIdMapping.ContainsKey(operationSummary.OperationId)) + if (expectedIdMapping.ContainsKey(operation.OperationId)) { - idMapping.Add(operationSummary.OperationId, operationSummary); + idMapping.Add(operation.OperationId, operation); } if (idMapping.Count == expectedIdMapping.Count) @@ -155,16 +155,18 @@ public async Task GetOperations() Assert.That(idMapping, Contains.Key(id)); OperationDetails expected = expectedIdMapping[id]; - OperationSummary operationSummary = idMapping[id]; - - Assert.That(operationSummary.OperationId, Is.EqualTo(expected.OperationId)); - Assert.That(operationSummary.ApiVersion, Is.EqualTo(expected.ApiVersion)); - Assert.That(operationSummary.Status, Is.EqualTo(expected.Status)); - Assert.That(operationSummary.PercentCompleted, Is.EqualTo(expected.PercentCompleted)); - Assert.That(operationSummary.ResourceLocation.AbsoluteUri, Is.EqualTo(expected.ResourceLocation.AbsoluteUri)); - Assert.That(operationSummary.CreatedDateTime, Is.EqualTo(expected.CreatedDateTime)); - Assert.That(operationSummary.LastUpdatedDateTime, Is.EqualTo(expected.LastUpdatedDateTime)); - Assert.That(operationSummary.Tags, Is.EquivalentTo(expected.Tags)); + OperationDetails operation = idMapping[id]; + + Assert.That(operation.OperationId, Is.EqualTo(expected.OperationId)); + Assert.That(operation.ApiVersion, Is.EqualTo(expected.ApiVersion)); + Assert.That(operation.Status, Is.EqualTo(expected.Status)); + Assert.That(operation.PercentCompleted, Is.EqualTo(expected.PercentCompleted)); + Assert.That(operation.ResourceLocation.AbsoluteUri, Is.EqualTo(expected.ResourceLocation.AbsoluteUri)); + Assert.That(operation.CreatedDateTime, Is.EqualTo(expected.CreatedDateTime)); + Assert.That(operation.LastUpdatedDateTime, Is.EqualTo(expected.LastUpdatedDateTime)); + Assert.That(operation.Tags, Is.EquivalentTo(expected.Tags)); + + Assert.That(operation.Error, Is.Null); } } diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Generated/Samples/Samples_DocumentModelAdministrationClient.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Generated/Samples/Samples_DocumentModelAdministrationClient.cs index 357c7959aa9e..ff2fc8b02de6 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Generated/Samples/Samples_DocumentModelAdministrationClient.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Generated/Samples/Samples_DocumentModelAdministrationClient.cs @@ -194,7 +194,6 @@ public void Example_GetModel_ShortVersion() Response response = client.GetModel("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("buildMode").ToString()); Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); } @@ -210,7 +209,6 @@ public async Task Example_GetModel_ShortVersion_Async() Response response = await client.GetModelAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("buildMode").ToString()); Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); } @@ -248,6 +246,12 @@ public void Example_GetModel_AllParameters() Response response = client.GetModel("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("buildMode").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); @@ -262,12 +266,6 @@ public void Example_GetModel_AllParameters() Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); } [Test] @@ -281,6 +279,12 @@ public async Task Example_GetModel_AllParameters_Async() Response response = await client.GetModelAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("buildMode").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); @@ -295,12 +299,6 @@ public async Task Example_GetModel_AllParameters_Async() Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); } [Test] @@ -845,7 +843,7 @@ public void Example_GetModels_ShortVersion_Convenience() AzureKeyCredential credential = new AzureKeyCredential(""); DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); - foreach (DocumentModelSummary item in client.GetModels()) + foreach (DocumentModelDetails item in client.GetModels()) { } } @@ -858,7 +856,7 @@ public async Task Example_GetModels_ShortVersion_Convenience_Async() AzureKeyCredential credential = new AzureKeyCredential(""); DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); - await foreach (DocumentModelSummary item in client.GetModelsAsync()) + await foreach (DocumentModelDetails item in client.GetModelsAsync()) { } } @@ -880,6 +878,20 @@ public void Example_GetModels_AllParameters() Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); Console.WriteLine(result.GetProperty("apiVersion").ToString()); Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); + Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); } } @@ -900,6 +912,20 @@ public async Task Example_GetModels_AllParameters_Async() Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); Console.WriteLine(result.GetProperty("apiVersion").ToString()); Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); + Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("azureBlobFileListSource").GetProperty("fileList").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("buildMode").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("example").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); + Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); } } @@ -911,7 +937,7 @@ public void Example_GetModels_AllParameters_Convenience() AzureKeyCredential credential = new AzureKeyCredential(""); DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); - foreach (DocumentModelSummary item in client.GetModels()) + foreach (DocumentModelDetails item in client.GetModels()) { } } @@ -924,7 +950,7 @@ public async Task Example_GetModels_AllParameters_Convenience_Async() AzureKeyCredential credential = new AzureKeyCredential(""); DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); - await foreach (DocumentModelSummary item in client.GetModelsAsync()) + await foreach (DocumentModelDetails item in client.GetModelsAsync()) { } } @@ -977,7 +1003,7 @@ public void Example_GetOperations_ShortVersion_Convenience() AzureKeyCredential credential = new AzureKeyCredential(""); DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); - foreach (OperationSummary item in client.GetOperations()) + foreach (OperationDetails item in client.GetOperations()) { } } @@ -990,7 +1016,7 @@ public async Task Example_GetOperations_ShortVersion_Convenience_Async() AzureKeyCredential credential = new AzureKeyCredential(""); DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); - await foreach (OperationSummary item in client.GetOperationsAsync()) + await foreach (OperationDetails item in client.GetOperationsAsync()) { } } @@ -1015,6 +1041,11 @@ public void Example_GetOperations_AllParameters() Console.WriteLine(result.GetProperty("resourceLocation").ToString()); Console.WriteLine(result.GetProperty("apiVersion").ToString()); Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); } } @@ -1038,6 +1069,11 @@ public async Task Example_GetOperations_AllParameters_Async() Console.WriteLine(result.GetProperty("resourceLocation").ToString()); Console.WriteLine(result.GetProperty("apiVersion").ToString()); Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); } } @@ -1049,7 +1085,7 @@ public void Example_GetOperations_AllParameters_Convenience() AzureKeyCredential credential = new AzureKeyCredential(""); DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); - foreach (OperationSummary item in client.GetOperations()) + foreach (OperationDetails item in client.GetOperations()) { } } @@ -1062,7 +1098,7 @@ public async Task Example_GetOperations_AllParameters_Convenience_Async() AzureKeyCredential credential = new AzureKeyCredential(""); DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); - await foreach (OperationSummary item in client.GetOperationsAsync()) + await foreach (OperationDetails item in client.GetOperationsAsync()) { } } @@ -1205,7 +1241,7 @@ public async Task Example_GetClassifiers_AllParameters_Convenience_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_BuildDocument_ShortVersion() + public void Example_BuildDocumentModel_ShortVersion() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -1216,18 +1252,17 @@ public void Example_BuildDocument_ShortVersion() modelId = "", buildMode = "template", }); - Operation operation = client.BuildDocument(WaitUntil.Completed, content); + Operation operation = client.BuildDocumentModel(WaitUntil.Completed, content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("buildMode").ToString()); Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_BuildDocument_ShortVersion_Async() + public async Task Example_BuildDocumentModel_ShortVersion_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -1238,44 +1273,43 @@ public async Task Example_BuildDocument_ShortVersion_Async() modelId = "", buildMode = "template", }); - Operation operation = await client.BuildDocumentAsync(WaitUntil.Completed, content); + Operation operation = await client.BuildDocumentModelAsync(WaitUntil.Completed, content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("buildMode").ToString()); Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_BuildDocument_ShortVersion_Convenience() + public void Example_BuildDocumentModel_ShortVersion_Convenience() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); BuildDocumentModelRequest buildRequest = new BuildDocumentModelRequest("", DocumentBuildMode.Template); - Operation operation = client.BuildDocument(WaitUntil.Completed, buildRequest); + Operation operation = client.BuildDocumentModel(WaitUntil.Completed, buildRequest); DocumentModelDetails responseData = operation.Value; } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_BuildDocument_ShortVersion_Convenience_Async() + public async Task Example_BuildDocumentModel_ShortVersion_Convenience_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentModelAdministrationClient client = new DocumentModelAdministrationClient(endpoint, credential); BuildDocumentModelRequest buildRequest = new BuildDocumentModelRequest("", DocumentBuildMode.Template); - Operation operation = await client.BuildDocumentAsync(WaitUntil.Completed, buildRequest); + Operation operation = await client.BuildDocumentModelAsync(WaitUntil.Completed, buildRequest); DocumentModelDetails responseData = operation.Value; } [Test] [Ignore("Only validating compilation of examples")] - public void Example_BuildDocument_AllParameters() + public void Example_BuildDocumentModel_AllParameters() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -1301,10 +1335,16 @@ public void Example_BuildDocument_AllParameters() key = "", }, }); - Operation operation = client.BuildDocument(WaitUntil.Completed, content); + Operation operation = client.BuildDocumentModel(WaitUntil.Completed, content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("buildMode").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); @@ -1319,17 +1359,11 @@ public void Example_BuildDocument_AllParameters() Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_BuildDocument_AllParameters_Async() + public async Task Example_BuildDocumentModel_AllParameters_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -1355,10 +1389,16 @@ public async Task Example_BuildDocument_AllParameters_Async() key = "", }, }); - Operation operation = await client.BuildDocumentAsync(WaitUntil.Completed, content); + Operation operation = await client.BuildDocumentModelAsync(WaitUntil.Completed, content); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("buildMode").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); @@ -1373,17 +1413,11 @@ public async Task Example_BuildDocument_AllParameters_Async() Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_BuildDocument_AllParameters_Convenience() + public void Example_BuildDocumentModel_AllParameters_Convenience() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -1402,13 +1436,13 @@ public void Example_BuildDocument_AllParameters_Convenience() ["key"] = "" }, }; - Operation operation = client.BuildDocument(WaitUntil.Completed, buildRequest); + Operation operation = client.BuildDocumentModel(WaitUntil.Completed, buildRequest); DocumentModelDetails responseData = operation.Value; } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_BuildDocument_AllParameters_Convenience_Async() + public async Task Example_BuildDocumentModel_AllParameters_Convenience_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -1427,7 +1461,7 @@ public async Task Example_BuildDocument_AllParameters_Convenience_Async() ["key"] = "" }, }; - Operation operation = await client.BuildDocumentAsync(WaitUntil.Completed, buildRequest); + Operation operation = await client.BuildDocumentModelAsync(WaitUntil.Completed, buildRequest); DocumentModelDetails responseData = operation.Value; } @@ -1454,7 +1488,6 @@ public void Example_ComposeModel_ShortVersion() BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("buildMode").ToString()); Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); } @@ -1482,7 +1515,6 @@ public async Task Example_ComposeModel_ShortVersion_Async() BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("buildMode").ToString()); Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); } @@ -1547,6 +1579,12 @@ public void Example_ComposeModel_AllParameters() BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("buildMode").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); @@ -1561,12 +1599,6 @@ public void Example_ComposeModel_AllParameters() Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); } [Test] @@ -1597,6 +1629,12 @@ public async Task Example_ComposeModel_AllParameters_Async() BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("buildMode").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); @@ -1611,12 +1649,6 @@ public async Task Example_ComposeModel_AllParameters_Async() Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); } [Test] @@ -1686,7 +1718,6 @@ public void Example_CopyModelTo_ShortVersion() BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("buildMode").ToString()); Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); } @@ -1712,7 +1743,6 @@ public async Task Example_CopyModelTo_ShortVersion_Async() BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("buildMode").ToString()); Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); } @@ -1764,6 +1794,12 @@ public void Example_CopyModelTo_AllParameters() BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("buildMode").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); @@ -1778,12 +1814,6 @@ public void Example_CopyModelTo_AllParameters() Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); } [Test] @@ -1807,6 +1837,12 @@ public async Task Example_CopyModelTo_AllParameters_Async() BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("apiVersion").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("buildMode").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("containerUrl").ToString()); Console.WriteLine(result.GetProperty("azureBlobSource").GetProperty("prefix").ToString()); @@ -1821,12 +1857,6 @@ public async Task Example_CopyModelTo_AllParameters_Async() Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldSchema").GetProperty("").GetProperty("items").GetProperty("example").ToString()); Console.WriteLine(result.GetProperty("docTypes").GetProperty("").GetProperty("fieldConfidence").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("apiVersion").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); } [Test] diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DisposableDocumentModel.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DisposableDocumentModel.cs index 3de29f8d8924..991c1f2c77e3 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DisposableDocumentModel.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DisposableDocumentModel.cs @@ -24,7 +24,7 @@ private DisposableDocumentModel(DocumentModelAdministrationClient client, Operat public static async Task BuildAsync(DocumentModelAdministrationClient client, BuildDocumentModelRequest buildRequest) { - Operation operation = await client.BuildDocumentAsync(WaitUntil.Completed, buildRequest); + Operation operation = await client.BuildDocumentModelAsync(WaitUntil.Completed, buildRequest); return new DisposableDocumentModel(client, operation); } diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceLiveTestBase.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceLiveTestBase.cs index eb5321fbe725..da00dcd4373e 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceLiveTestBase.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Infrastructure/DocumentIntelligenceLiveTestBase.cs @@ -4,8 +4,6 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; using Azure.Core.TestFramework; using Azure.Core.TestFramework.Models; @@ -13,34 +11,22 @@ namespace Azure.AI.DocumentIntelligence.Tests { public class DocumentIntelligenceLiveTestBase : RecordedTestBase { - private readonly AzureAIDocumentIntelligenceClientOptions _clientOptions; - public DocumentIntelligenceLiveTestBase(bool isAsync, RecordedTestMode? mode = null) : base(isAsync, mode) { - // After rebranding to Document Intelligence, the paths in service endpoints have been renamed as well. For example: - // Until 2023-07-31: /formrecognizer/documentModels:build - // After 2023-07-31: /documentintelligence/documentModels:build - // This library has been generated from a typespec file targeting 2023-10-31-preview, so the generated code builds - // endpoints with the 'documentintelligence' path. We're still using 2023-07-31 for testing, so we need to replace - // it with 'formrecognizer'. We are using a ReplaceDocumentIntelligencePolicy to this end as a temporary workaround. - - _clientOptions = new AzureAIDocumentIntelligenceClientOptions(AzureAIDocumentIntelligenceClientOptions.ServiceVersion.V2023_07_31); - _clientOptions.AddPolicy(new ReplaceDocumentIntelligencePolicy(), HttpPipelinePosition.PerCall); - JsonPathSanitizers.Add("$..accessToken"); BodyKeySanitizers.Add(new BodyKeySanitizer("https://sanitized.blob.core.windows.net") { JsonPath = "$..containerUrl" }); SanitizedHeaders.Add("Ocp-Apim-Subscription-Key"); } - protected string ServiceVersionString { get; } = "2023-07-31"; + protected string ServiceVersionString { get; } = "2023-10-31-preview"; protected DocumentAnalysisClient CreateDocumentAnalysisClient() { var endpoint = new Uri(TestEnvironment.Endpoint); var credential = new AzureKeyCredential(TestEnvironment.ApiKey); - var nonInstrumentedClient = new DocumentAnalysisClient(endpoint, credential, _clientOptions); + var nonInstrumentedClient = new DocumentAnalysisClient(endpoint, credential); return InstrumentClient(nonInstrumentedClient); } @@ -50,7 +36,7 @@ protected DocumentModelAdministrationClient CreateDocumentModelAdministrationCli var endpoint = new Uri(TestEnvironment.Endpoint); var credential = new AzureKeyCredential(TestEnvironment.ApiKey); - var nonInstrumentedClient = new DocumentModelAdministrationClient(endpoint, credential, _clientOptions); + var nonInstrumentedClient = new DocumentModelAdministrationClient(endpoint, credential); return InstrumentClient(nonInstrumentedClient); } @@ -110,15 +96,5 @@ protected async Task BuildDisposableDocumentClassi return await DisposableDocumentClassifier.BuildAsync(client, request); } - - private class ReplaceDocumentIntelligencePolicy : HttpPipelineSynchronousPolicy - { - public override void OnSendingRequest(HttpMessage message) - { - RequestUriBuilder uriBuilder = message.Request.Uri; - - uriBuilder.Path = uriBuilder.Path.Replace("documentintelligence", "formrecognizer"); - } - } } } diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tsp-location.yaml b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tsp-location.yaml index 217f2358cb6a..8abaa5f25655 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tsp-location.yaml +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tsp-location.yaml @@ -1,3 +1,3 @@ directory: specification/cognitiveservices/DocumentIntelligence -commit: 6d4f448a83ac23456b8fc14f9ba5e685ae9eb215 +commit: 848f569574785ce962c31e7de25082e942b8486a repo: Azure/azure-rest-api-specs-pr diff --git a/sdk/documentintelligence/ci.yml b/sdk/documentintelligence/ci.yml index 23612921d214..9427556d76cc 100644 --- a/sdk/documentintelligence/ci.yml +++ b/sdk/documentintelligence/ci.yml @@ -8,9 +8,7 @@ trigger: - release/* paths: include: - - sdk/newprojecttypespec - - sdk/newprojecttypespec/ci.yml - - sdk/newprojecttypespec/Azure.NewProject.TypeSpec + - sdk/documentintelligence/ pr: branches: @@ -21,15 +19,13 @@ pr: - release/* paths: include: - - sdk/newprojecttypespec - - sdk/newprojecttypespec/ci.yml - - sdk/newprojecttypespec/Azure.NewProject.TypeSpec + - sdk/documentintelligence/ extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: - ServiceDirectory: newprojecttypespec + ServiceDirectory: documentintelligence ArtifactName: packages Artifacts: - - name: Azure.NewProject.TypeSpec - safeName: AzureNewProjectTypeSpec + - name: Azure.AI.DocumentIntelligence + safeName: AzureAIDocumentIntelligence